Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] read xlsx with Chartsheet. closes #123 #124

Merged
merged 7 commits into from
Apr 6, 2022
Merged

[WIP] read xlsx with Chartsheet. closes #123 #124

merged 7 commits into from
Apr 6, 2022

Conversation

JanMarvin
Copy link
Owner

No description provided.

@JanMarvin
Copy link
Owner Author

JanMarvin commented Apr 5, 2022

Codecov Report

Merging #124 (19dfd15) into main (1eb26f2) will increase coverage by 0.86%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #124      +/-   ##
==========================================
+ Coverage   59.30%   60.17%   +0.86%     
==========================================
  Files          39       39              
  Lines        7306     7307       +1     
==========================================
+ Hits         4333     4397      +64     
+ Misses       2973     2910      -63     
Impacted Files Coverage Δ
R/loadWorkbook.R 90.10% <100.00%> (+4.97%) ⬆️
R/class-workbook.R 53.02% <0.00%> (+2.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1eb26f2...19dfd15. Read the comment docs.

@JanMarvin
Copy link
Owner Author

I wanted to use something like this, but somehow the ids did not match:

# sheets name rid
sheets <- rbindlist(xml_attr(workbook_xml, "workbook", "sheets", "sheet"))
sheets <- sheets[sheets$`r:id` != "",]

# sheets type
wb_rels_xml <- rbindlist(xml_attr(workbookRelsXML, "Relationships", "Relationship"))

# combine both
sheets <- merge(
  sheets, wb_rels_xml,
  by.x = "r:id", by.y = "Id",
  all.x = TRUE, all.y = FALSE
)

# get typ and full path
sheets$typ <- basename(sheets$Type)
sheets$target <- stri_join(xmlDir, "/xl/", sheets$Target)

@JanMarvin JanMarvin merged commit 4931ed2 into main Apr 6, 2022
@JanMarvin JanMarvin deleted the chartsheet branch April 6, 2022 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant