Skip to content

Commit

Permalink
Merge pull request #478 from ycphs/restore_load_example
Browse files Browse the repository at this point in the history
fix loading "loadExample.xlsx"
  • Loading branch information
JanMarvin authored Jul 19, 2024
2 parents 36a41ba + c6b3517 commit 853c9ce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/loadWorkbook.R
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,11 @@ loadWorkbook <- function(file, xlsxFile = NULL, isUnzipped = FALSE) {
wb$Content_Types <- c(wb$Content_Types, sprintf('<Override PartName="/xl/slicerCaches/slicerCache%s.xml" ContentType="application/vnd.ms-excel.slicerCache+xml"/>', inds))
wb$slicerCaches <- sapply(slicerCachesXML[order(nchar(slicerCachesXML), slicerCachesXML)], function(x) removeHeadTag(cppReadFile(x)))
wb$workbook.xml.rels <- c(wb$workbook.xml.rels, sprintf('<Relationship Id="rId%s" Type="http://schemas.microsoft.com/office/2007/relationships/slicerCache" Target="slicerCaches/slicerCache%s.xml"/>', 1E5 + inds, inds))
wb$workbook$extLst <- c(wb$workbook$extLst, genSlicerCachesExtLst(1E5 + inds))

if (!grepl("slicerCaches", wb$workbook$extLst))
wb$workbook$extLst <- c(wb$workbook$extLst, genSlicerCachesExtLst(1E5 + inds))
else
wb$workbook$extLst <- genSlicerCachesExtLst(1E5 + inds)
}


Expand Down

0 comments on commit 853c9ce

Please sign in to comment.