-
Notifications
You must be signed in to change notification settings - Fork 11
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
[R/save] use dir.exist(). closes #263 #265
Conversation
Just ran the code with both versions (@head/@gh_issue_263) on my system. From: @Head - expecting this to fail > remotes::install_github("JanMarvin/openxlsx2")
Downloading GitHub repo JanMarvin/openxlsx2@HEAD
✔ checking for file 'D:\RtmpqSMLGY\remotes34a864c963cf\JanMarvin-openxlsx2-dce5801/DESCRIPTION' (11.1s)
─ preparing 'openxlsx2': (4m 56.5s)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (25.7s)
─ checking for empty or unneeded directories (10.7s)
─ building 'openxlsx2_0.2.1.9000.tar.gz'
* installing *source* package 'openxlsx2' ...
** using staged installation
** libs
[...]
installing to C:/Program Files/R/R-4.2.1/library/00LOCK-openxlsx2/00new/openxlsx2/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (openxlsx2)
> library(openxlsx2)
Attaching package: ‘openxlsx2’
The following object is masked from ‘package:readr’:
write_file
> wb_workbook() %>%
+ wb_add_worksheet() %>%
+ wb_add_data(x = mtcars) %>%
+ wb_save("mtcars.xlsx")
Error in wb$clone()$save(path = path, overwrite = overwrite) :
Failed to create temporary directory 'D:\\RtmpqSMLGY\workbookTemp_34a83c0b173e'
In addition: Warning message:
In dir.create(path = tmpDir, recursive = TRUE) :
cannot create dir 'D:\', reason 'Permission denied'
> From: @gh_issue_263 - testing for failure > remotes::install_github("JanMarvin/openxlsx2", ref = "gh_issue_263")
Downloading GitHub repo JanMarvin/openxlsx2@gh_issue_263
✔ checking for file 'D:\RtmpY7UPwL\remotes3b6c11ad786d\JanMarvin-openxlsx2-e6ff5ae/DESCRIPTION' (10s)
─ preparing 'openxlsx2': (43.6s)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts (22.2s)
─ checking for empty or unneeded directories (1.2s)
─ building 'openxlsx2_0.2.1.9000.tar.gz'
* installing *source* package 'openxlsx2' ...
** using staged installation
** libs
[...]
installing to C:/Program Files/R/R-4.2.1/library/00LOCK-openxlsx2/00new/openxlsx2/libs/x64
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures```
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (openxlsx2)
> library(openxlsx2)
> wb_workbook() %>%
+ wb_add_worksheet() %>%
+ wb_add_data(x = mtcars) %>%
+ wb_save("mtcars.xlsx")
Error in file(file.path(xlthemeDir, "theme1.xml"), open = "wb") :
cannot open the connection
In addition: Warning messages:
1: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
2: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
3: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
4: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
5: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
6: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
7: In dir.create(path, showWarnings = warn, recursive = recurse) :
cannot create dir 'D:\', reason 'Permission denied'
8: In file(file.path(xlthemeDir, "theme1.xml"), open = "wb") :
cannot open file 'D:\\RtmpY7UPwL\workbookTemp_3b6c66325311/xl/theme/theme1.xml': No such file or directory
> Same issues as before - is the |
Thanks for the follow up, it was |
It worked with the latest changes. Here's the R console output from RStudio: > tempdir()
[1] "D:\\\\RtmpGIwyET"
> library(openxlsx2)
> wb_workbook() %>%
+ wb_add_worksheet() %>%
+ wb_add_data(x = mtcars) %>%
+ wb_save("mtcars.xlsx")
[1] "mtcars.xlsx" Here's the output from the Microsoft Excel sheet:
Here's the output from the
The implications depend on the need to actually create a folder structure during runtime recursively. Line 962 in 72ff05f
For example: xlDir <- dir_create(tmpDir, "xl") # parent is created here
[...]
xlworksheetsDir <- dir_create(tmpDir, "xl", "worksheets") # child 1 is created here
xlworksheetsRelsDir <- dir_create(tmpDir, "xl", "worksheets", "_rels") # child 2 is created here |
I'm currently repeating the tests with openxlsx2@head. |
Thanks for checking and testing! Yes, we only create folders explicitly. I thought that it works as So we got saving working for us. The other failing tests might use some other resurse option, I haven't checked yet. At first glance I saw some errors regarding missing directories. |
# @head on C:\ (default %TEMP%)
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 897 ]
══ Skipped tests ══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 897 ]
# @gh_issue_263 on C:\ (default %TEMP%)
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 28 | WARN 0 | SKIP 1 | PASS 796 ]
══ Skipped tests ══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
══ Failed tests ═══════════════════════════════════════════════════════════════════════════════════
── Error (test-class-workbook-wrappers.R:404:3): wb_clone_sheet_style() is a wrapper ──
Error in `get(method, wbWorkbook$public_methods)`: object 'clone_sheet_style' not found
Backtrace:
▆
1. └─openxlsx2:::expect_wrapper(...) at test-class-workbook-wrappers.R:404:2
2. └─base::get(method, wbWorkbook$public_methods)
── Error (test-conditional_formatting.R:30:3): type = 'expression' work ────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:30:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:173:3): type = 'duplicated' works ──────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:173:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:185:3): type = 'containsText' works ────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:185:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:205:3): type = 'notContainsText' works ──
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:205:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:224:3): type = 'beginsWith' works ──────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:224:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:237:3): type = 'endsWith' works ────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:237:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:256:3): type = 'colorScale' works ──────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:256:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:280:3): type = 'databar' works ─────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:280:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:292:3): type = 'between' works ─────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:292:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:311:3): type = 'topN' works ────────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:311:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:344:3): type = 'bottomN' works ─────────
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:344:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Error (test-conditional_formatting.R:378:3): type as logical operators work ──
Error in `data.frame(typ = typ, id = id[length(id)], name = style_name[sty])`: arguments imply differing number of rows: 0, 1
Backtrace:
▆
1. └─openxlsx2 (local) my_workbook() at test-conditional_formatting.R:378:2
2. └─wb$styles_mgr$add(negStyle, "negStyle") at test-conditional_formatting.R:6:2
3. └─base::data.frame(typ = typ, id = id[length(id)], name = style_name[sty])
── Failure (test-conditional_formatting.R:417:3): colorScale ───────────────────
`exp` (`actual`) not identical to wb$worksheets[[1]]$conditionalFormatting (`expected`).
lines(actual) vs lines(expected)
- "<cfRule type=\"colorScale\" priority=\"1\"><colorScale><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FF000000\"/><color rgb=\"FFFFFFFF\"/></colorScale></cfRule>"
+ "<cfRule type=\"colorScale\" priority=\"1\"><colorScale>"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FF000000\"/><color rgb=\"FFFFFFFF\"/>"
+ " </colorScale></cfRule>"
── Failure (test-conditional_formatting.R:436:3): colorScale ───────────────────
`exp` (`actual`) not identical to wb$worksheets[[2]]$conditionalFormatting (`expected`).
lines(actual) vs lines(expected)
- "<cfRule type=\"colorScale\" priority=\"1\"><colorScale><cfvo type=\"num\" val=\"1\"/><cfvo type=\"num\" val=\"255\"/><color rgb=\"FF0000FF\"/><color rgb=\"FFFF0000\"/></colorScale></cfRule>"
+ "<cfRule type=\"colorScale\" priority=\"1\"><colorScale>"
+ " <cfvo type=\"num\" val=\"1\"/><cfvo type=\"num\" val=\"255\"/>"
+ " <color rgb=\"FF0000FF\"/><color rgb=\"FFFF0000\"/>"
+ " </colorScale></cfRule>"
── Failure (test-conditional_formatting.R:454:3): colorScale ───────────────────
`exp` (`actual`) not identical to wb$worksheets[[3]]$conditionalFormatting (`expected`).
lines(actual) vs lines(expected)
- "<cfRule type=\"colorScale\" priority=\"1\"><colorScale><cfvo type=\"min\"/><cfvo type=\"percentile\" val=\"50\"/><cfvo type=\"max\"/><color rgb=\"FFFF0000\"/><color rgb=\"FF00FF00\"/><color rgb=\"FF0000FF\"/></colorScale></cfRule>"
+ "<cfRule type=\"colorScale\" priority=\"1\"><colorScale>"
+ " <cfvo type=\"min\"/><cfvo type=\"percentile\" val=\"50\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FFFF0000\"/><color rgb=\"FF00FF00\"/><color rgb=\"FF0000FF\"/>"
+ " </colorScale></cfRule>"
── Failure (test-conditional_formatting.R:476:3): colorScale ───────────────────
`exp` (`actual`) not identical to wb$worksheets[[4]]$conditionalFormatting (`expected`).
lines(actual) vs lines(expected)
- "<cfRule type=\"colorScale\" priority=\"1\"><colorScale><cfvo type=\"num\" val=\"1\"/><cfvo type=\"num\" val=\"155\"/><cfvo type=\"num\" val=\"255\"/><color rgb=\"FFFF0000\"/><color rgb=\"FF00FF00\"/><color rgb=\"FF0000FF\"/></colorScale></cfRule>"
+ "<cfRule type=\"colorScale\" priority=\"1\"><colorScale>"
+ " <cfvo type=\"num\" val=\"1\"/><cfvo type=\"num\" val=\"155\"/><cfvo type=\"num\" val=\"255\"/>"
+ " <color rgb=\"FFFF0000\"/><color rgb=\"FF00FF00\"/><color rgb=\"FF0000FF\"/>"
+ " </colorScale></cfRule>"
── Failure (test-conditional_formatting.R:564:3): extend dataBar tests ─────────
`exp` (`actual`) not equal to `got` (`expected`).
lines(actual[[1]]) vs lines(expected[[1]])
- "<cfRule type=\"dataBar\" priority=\"6\"><dataBar showValue=\"1\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FF638EC6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40000}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"6\"><dataBar showValue=\"1\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FF638EC6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40000}</x14:id></ext>"
+ " </extLst></cfRule>"
lines(actual[[2]]) vs lines(expected[[2]])
- "<cfRule type=\"dataBar\" priority=\"5\"><dataBar showValue=\"0\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FF638EC6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40001}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"5\"><dataBar showValue=\"0\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FF638EC6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40001}</x14:id></ext>"
+ " </extLst></cfRule>"
lines(actual[[3]]) vs lines(expected[[3]])
- "<cfRule type=\"dataBar\" priority=\"4\"><dataBar showValue=\"0\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FFA6A6A6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40002}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"4\"><dataBar showValue=\"0\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FFA6A6A6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40002}</x14:id></ext>"
+ " </extLst></cfRule>"
lines(actual[[4]]) vs lines(expected[[4]])
- "<cfRule type=\"dataBar\" priority=\"3\"><dataBar showValue=\"1\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FFFF0000\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40003}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"3\"><dataBar showValue=\"1\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FFFF0000\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40003}</x14:id></ext>"
+ " </extLst></cfRule>"
lines(actual[[5]]) vs lines(expected[[5]])
- "<cfRule type=\"dataBar\" priority=\"2\"><dataBar showValue=\"1\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FFA6A6A6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40004}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"2\"><dataBar showValue=\"1\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FFA6A6A6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40004}</x14:id></ext>"
+ " </extLst></cfRule>"
lines(actual[[6]]) vs lines(expected[[6]])
- "<cfRule type=\"dataBar\" priority=\"1\"><dataBar showValue=\"1\"><cfvo type=\"num\" val=\"0\"/><cfvo type=\"num\" val=\"5\"/><color rgb=\"FFA6A6A6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40005}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"1\"><dataBar showValue=\"1\">"
+ " <cfvo type=\"num\" val=\"0\"/><cfvo type=\"num\" val=\"5\"/>"
+ " <color rgb=\"FFA6A6A6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\">"
+ " <x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40005}</x14:id></ext></extLst></cfRule>"
── Failure (test-conditional_formatting.R:576:3): extend dataBar tests ─────────
`exp` (`actual`) not equal to `got` (`expected`).
lines(actual) vs lines(expected)
- "<ext uri=\"{78C0D931-6437-407d-A8EE-F0AAD7539E65}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\">"
- " <x14:conditionalFormattings>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40000}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"1\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FF638EC6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>A1:A11</xm:sqref></x14:conditionalFormatting>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40001}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"0\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FF638EC6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>C1:C11</xm:sqref></x14:conditionalFormatting>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40002}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"1\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FFA6A6A6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>E1:E11</xm:sqref></x14:conditionalFormatting>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40003}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"0\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FFFF0000\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>G1:G11</xm:sqref></x14:conditionalFormatting>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40004}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"0\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FFA6A6A6\"/><x14:negativeFillColor rgb=\"FFA6A6A6\"/><x14:negativeBorderColor rgb=\"FFA6A6A6\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>I1:I11</xm:sqref></x14:conditionalFormatting>"
- " <x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\"><x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40005}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"0\" negativeBarBorderColorSameAsPositive=\"0\"><x14:cfvo type=\"num\"><xm:f>0</xm:f></x14:cfvo><x14:cfvo type=\"num\"><xm:f>5</xm:f></x14:cfvo><x14:borderColor rgb=\"FFA6A6A6\"/><x14:negativeFillColor rgb=\"FFA6A6A6\"/><x14:negativeBorderColor rgb=\"FFA6A6A6\"/><x14:axisColor rgb=\"FF000000\"/></x14:dataBar></x14:cfRule><xm:sqref>K1:K11</xm:sqref></x14:conditionalFormatting>"
- " </x14:conditionalFormattings></ext>"
+ "<ext uri=\"{78C0D931-6437-407d-A8EE-F0AAD7539E65}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:conditionalFormattings><x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\">"
+ " <x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40000}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"1\" negativeBarBorderColorSameAsPositive=\"0\">"
+ " <x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FF638EC6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/>"
+ " </x14:dataBar></x14:cfRule><xm:sqref>A1:A11</xm:sqref></x14:conditionalFormatting><x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\">"
+ " <x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40001}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"0\" negativeBarBorderColorSameAsPositive=\"0\">"
+ " <x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FF638EC6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/>"
+ " </x14:dataBar></x14:cfRule><xm:sqref>C1:C11</xm:sqref></x14:conditionalFormatting><x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\">"
+ " <x14:cfRule type=\"dataBar\" id=\"{F7189283-14F7-4DE0-9601-54DE9DB40002}\"><x14:dataBar minLength=\"0\" maxLength=\"100\" border=\"1\" gradient=\"1\" negativeBarBorderColorSameAsPositive=\"0\">"
+ " <x14:cfvo type=\"autoMin\"/><x14:cfvo type=\"autoMax\"/><x14:borderColor rgb=\"FFA6A6A6\"/><x14:negativeFillColor rgb=\"FFFF0000\"/><x14:negativeBorderColor rgb=\"FFFF0000\"/><x14:axisColor rgb=\"FF000000\"/>"
+ " </x14:dataBar></x14:cfRule><xm:sqref>E1:E11</xm:sqref></x14:conditionalFormatting><x14:conditionalFormatting xmlns:xm=\"http://schemas.microsoft.com/office/excel/2006/main\">"
and 10 more ...
── Failure (test-conditional_formatting.R:595:3): wb_conditional_formatting ────
`exp` (`actual`) not equal to `got` (`expected`).
lines(actual) vs lines(expected)
- "<cfRule type=\"dataBar\" priority=\"1\"><dataBar showValue=\"1\"><cfvo type=\"min\"/><cfvo type=\"max\"/><color rgb=\"FF638EC6\"/></dataBar><extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40000}</x14:id></ext></extLst></cfRule>"
+ "<cfRule type=\"dataBar\" priority=\"1\"><dataBar showValue=\"1\">"
+ " <cfvo type=\"min\"/><cfvo type=\"max\"/>"
+ " <color rgb=\"FF638EC6\"/>"
+ " </dataBar>"
+ " <extLst><ext uri=\"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}\" xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"><x14:id>{F7189283-14F7-4DE0-9601-54DE9DB40000}</x14:id></ext>"
+ " </extLst></cfRule>"
── Failure (test-read_sources.R:130:3): encoding ───────────────────────────────
`exp` (`actual`) not equal to `got` (`expected`).
lines(actual) | lines(expected)
[1] "<xml>" | "<xml>" [1]
[2] " <a0>äöüß</a0>" - "<a0>äöüß</a0>" [2]
[3] " <A0>ÄÖÜ</A0>" - "<A0>ÄÖÜ</A0>" [3]
[4] " <a1>€</a1>" - "<a1>€</a1>" [4]
[5] "</xml>" | "</xml>" [5]
── Failure (test-read_sources.R:135:3): encoding ───────────────────────────────
`exp` (`actual`) not equal to `got` (`expected`).
lines(actual) | lines(expected)
[1] "<xml><a0>äöüß</a0><A0>ÄÖÜ</A0><a1>€</a1></xml>" - "<xml>" [1]
- "<a0>äöüß</a0>" [2]
- "<A0>ÄÖÜ</A0>" [3]
- "<a1>€</a1>" [4]
- "</xml>" [5]
── Error (test-helper_functions.R:111:3): amp_split & genHeaderFooterNode ──────
Error in `getHeaderFooterNode(xml)`: could not find function "getHeaderFooterNode"
── Error (test-pugi_cpp.R:8:3): read_xml ───────────────────────────────────────
Error in `readXMLPtr(xml, isfile = FALSE, escapes = FALSE, declaration = FALSE,
whitespace = TRUE)`: unused argument (whitespace = TRUE)
Backtrace:
▆
1. └─testthat::expect_silent(...) at test-pugi_cpp.R:8:2
2. └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. ├─testthat (local) .capture(...)
4. │ ├─withr::with_output_sink(...)
5. │ │ └─base::force(code)
6. │ ├─base::withCallingHandlers(...)
7. │ └─base::withVisible(code)
8. └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
── Error (test-pugixml.R:11:3): read_xml ───────────────────────────────────────
Error in `read_xml(xml, whitespace = TRUE, pointer = FALSE)`: unused argument (whitespace = TRUE)
── Error (test-save.R:248:3): write cells without data ─────────────────────────
Error in `write_data2(wb = wb, sheet = sheet, data = x, name = name, colNames = colNames,
rowNames = rowNames, startRow = startRow, startCol = startCol,
removeCellStyle = removeCellStyle, na.strings = na.strings)`: 'list' object cannot be coerced to type 'logical'
Backtrace:
▆
1. └─wb_workbook()$add_worksheet()$add_data(...) at test-save.R:248:2
2. └─openxlsx2::write_data(...)
3. └─openxlsx2:::write_data_table(...)
4. └─openxlsx2::write_data2(...)
── Error (test-wb_styles.R:6:3): wb_clone_sheet_style ──────────────────────────
Error in `wb_clone_sheet_style(wb, "SUM", "clone")`: could not find function "wb_clone_sheet_style"
── Error (test-writeData.R:84:3): missing x is caught early [246] ──────────────
Error in `wb$.__enclos_env__$private$get_sheet_index(sheet)`: 'list' object cannot be coerced to type 'integer'
Backtrace:
▆
1. ├─testthat::expect_error(wb_workbook()$add_data(mtcars), "`x` is missing") at test-writeData.R:84:2
2. │ └─testthat:::expect_condition_matching(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─wb_workbook()$add_data(mtcars)
8. └─openxlsx2::write_data(...)
9. └─openxlsx2:::write_data_table(...)
10. └─wb$.__enclos_env__$private$get_sheet_index(sheet)
[ FAIL 28 | WARN 0 | SKIP 1 | PASS 796 ]
Error: Test failures
# @head on D:\ (at root)
> library(openxlsx2)
> library(testthat)
> library(openxlsx2)
> library(rstudioapi)
>
> # set path to current script directory
> setwd(dirname(getSourceEditorContext()$path))
>
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 75 | WARN 26 | SKIP 1 | PASS 496 ]
══ Skipped tests ═══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
══ Failed tests ════════════════════════════════════════════════════════════════════════════════════
── Error (test-class-comment.R:54:3): comments ─────────────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c33a36bbd'
Backtrace:
▆
1. ├─testthat::expect_silent(wb_save(wb, tmp)) at test-class-comment.R:54:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_save(wb, tmp)
10. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-class-comment.R:62:3): load comments ────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-comment.R:62:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:5:3): read_xlsx from different sources ───────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(xlsxFile) at test-read_sources.R:5:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:29:3): wb_load from different sources ────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-read_sources.R:29:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:44:3): get_date_origin from different sources ────
Error in `unzip(xlsxFile, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::get_date_origin(xlsxFile) at test-read_sources.R:44:2
2. └─utils::unzip(xlsxFile, exdir = xmlDir)
── Error (test-read_sources.R:60:3): read html source without r attribute on cell ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load("https://github.com/JanMarvin/openxlsx2/files/8702731/fichier_complementaire_ccam_descriptive_a_usage_pmsi_2021_v2.xlsx") at test-read_sources.R:60:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:81:3): read <br> node in vml ─────────────────────
Error in `zip::unzip(temp_zip, exdir = temp_dir)`: zip error: `Cannot open zip file `D:\RtmpUr33u7\file22d027667ebd\macro2.xlsm.zip` for reading` in file `zip.c:136`
Backtrace:
▆
1. └─zip::unzip(temp_zip, exdir = temp_dir) at test-read_sources.R:81:2
── Error (test-read_sources.R:94:3): encoding ──────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-read_sources.R:94:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-clean_sheet.R:4:3): clean_sheet ─────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsx) at test-clean_sheet.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-cloneWorksheet.R:8:3): clone Worksheet with data ────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = file_name) at test-cloneWorksheet.R:8:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-cloneWorksheet.R:21:3): clone empty Worksheet ───────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = file_name) at test-cloneWorksheet.R:21:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:169:3): type = 'expression' work ───────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0297e24fb'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:169:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:181:3): type = 'duplicated' works ──────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d087d5c48'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:181:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:201:3): type = 'containsText' works ────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0393641d'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:201:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:220:3): type = 'notContainsText' works ──
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d010a01854'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:220:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:233:3): type = 'beginsWith' works ──────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d071172af7'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:233:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:252:3): type = 'endsWith' works ────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d06cda58c8'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:252:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:259:3): type = 'colorScale' works ──────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-conditional_formatting.R:259:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:288:3): type = 'databar' works ─────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0788edb9'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:288:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:307:3): type = 'between' works ─────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d02dba1975'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:307:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:340:3): type = 'topN' works ────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d060fb1fdb'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:340:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:374:3): type = 'bottomN' works ─────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d02a0e4afe'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:374:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:392:3): type as logical operators work ──
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d08ed1669'
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:392:2
2. ├─testthat::expect_silent(wb_save(wb, path)) at test-conditional_formatting.R:17:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_save(wb, path)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-conditional_formatting.R:402:3): colorScale ─────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-conditional_formatting.R:402:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-deleting_tables.R:81:3): Deleting a Table Object ────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d053953cf9'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp) at test-deleting_tables.R:81:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-deleting_tables.R:127:3): Save and load Table Deletion ──────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d052a51fe5'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp_file) at test-deleting_tables.R:127:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-fill_merged_cells.R:16:3): fill merged cells ────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d01820307c'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, tmp_file) at test-fill_merged_cells.R:16:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-formulas.R:4:3): load various formulas ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-formulas.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-helper_functions.R:89:3): ws_page_setup example ─────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d03c5d7d16'
Backtrace:
▆
1. ├─testthat::expect_silent(wb_save(wb, tmp, overwrite = TRUE)) at test-helper_functions.R:89:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_save(wb, tmp, overwrite = TRUE)
10. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-loading_workbook.R:4:3): Loading readTest.xlsx Sheet 1 ──────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:16:3): Loading multiple pivot tables: loadPivotTables.xlsx works ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:16:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:38:3): Load and saving a file with Threaded Comments works ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(wb <- wb_load(fl)) at test-loading_workbook.R:38:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(fl)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:47:3): Read and save file with inlineStr ─────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:47:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:143:3): sheet visibility ─────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:143:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:173:3): additional wb tests ──────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-loading_workbook.R:173:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:242:3): test headerFooter ────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d02aee118a'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, tmp1, overwrite = TRUE) at test-loading_workbook.R:242:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-loading_workbook.R:259:3): load workbook with chartsheet ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(z <- wb_load(fl)) at test-loading_workbook.R:259:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(fl)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook_tables.R:4:3): Tables loaded correctly ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(...) at test-loading_workbook_tables.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Failure (test-names.R:18:3): names ──────────────────────────────────────────
`wb_save(wb, tmp)` threw an unexpected error.
Message: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d021176459'
Class: simpleError/error/condition
Backtrace:
▆
1. ├─testthat::expect_error(wb_save(wb, tmp), NA) at test-names.R:18:2
2. │ └─testthat:::expect_condition_matching(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─openxlsx2::wb_save(wb, tmp)
8. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-names.R:20:3): names ────────────────────────────────────────────
Error in `wb_load(tmp)`: File does not exist.
Backtrace:
▆
1. └─openxlsx2::wb_load(tmp) at test-names.R:20:2
── Error (test-protect-workbook.R:29:3): Reading protected Workbook ────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d06b065b0f'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp_file) at test-protect-workbook.R:29:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-named_regions.R:25:3): Maintaining Named Regions on Load ────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c68a91c62'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, out_file, overwrite = TRUE) at test-named_regions.R:25:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-named_regions.R:60:3): Correctly Loading Named Regions Created in Excel ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-named_regions.R:60:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:117:3): Load names from an Excel file with funky non-region names ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-named_regions.R:117:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:189:3): Missing rows in named regions ───────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c27a110a6'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp_file) at test-named_regions.R:189:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-named_regions.R:262:3): Missing columns in named regions ────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301cb216e4b'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp_file) at test-named_regions.R:262:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-named_regions.R:300:3): Matching Substrings breaks reading named regions ──
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c31eb541a'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, temp_file) at test-named_regions.R:300:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-named_regions.R:334:3): Read namedRegion from specific sheet ────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_sheet_names(filename) at test-named_regions.R:334:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:410:5): deprecation test ────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_warning(...) at test-named_regions.R:410:4
2. │ └─testthat:::expect_condition_matching(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─openxlsx2::wb_to_df(filename, definedName = "MyRange")
8. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
9. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_write_logicals.R:14:3): TRUE, FALSE, NA ────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c252d4db3'
Backtrace:
▆
1. └─openxlsx2::write_xlsx(x, file = fileName, colNames = TRUE) at test-read_write_logicals.R:14:2
2. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
3. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-read_from_created_wb.R:74:3): Reading NAs and NaN values ────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d05a8c44e8'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, path = fileName, overwrite = TRUE) at test-read_from_created_wb.R:74:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-read_xlsx_correct_sheet.R:3:3): read_xlsx correct sheet ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_sheet_names(file = fl) at test-read_xlsx_correct_sheet.R:3:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_xlsx_random_seed.R:6:3): read_xlsx() does not change random seed ──
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d076d14169'
Backtrace:
▆
1. └─openxlsx2::write_xlsx(data.frame(a = 1), tf) at test-read_xlsx_random_seed.R:6:2
2. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
3. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-remove_worksheets.R:25:3): Deleting worksheets ──────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c45d4fcb'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, tempFile, overwrite = TRUE) at test-remove_worksheets.R:25:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-styles_xml.R:4:3): xf ───────────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:40:3): border ──────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:40:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:68:3): cellStyle ───────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:68:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:94:3): tableStyle ──────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:94:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:119:3): dxf ────────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:119:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:145:3): colors ─────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:145:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-save.R:4:3): test return values for wb_save ─────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d057b842fc'
Backtrace:
▆
1. ├─testthat::expect_identical(tempFile, wb_save(wb, tempFile)) at test-save.R:4:2
2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─openxlsx2::wb_save(wb, tempFile)
5. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:20:3): regression test for #248 ──────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d01aed7a71'
Backtrace:
▆
1. ├─testthat::expect_silent(...) at test-save.R:20:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::write_xlsx(df, tempFile, borders = "columns", overwrite = TRUE)
10. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:49:3): creating hyperlinks ───────────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0549d5f82'
Backtrace:
▆
1. ├─testthat::expect_silent(wb_save(wb, tempFile, overwrite = TRUE)) at test-save.R:49:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_save(wb, tempFile, overwrite = TRUE)
10. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:72:3): write_data2 ───────────────────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0439a455e'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, file) at test-save.R:72:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:104:3): write xlsx ───────────────────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d06bb55c3f'
Backtrace:
▆
1. ├─testthat::expect_silent(write_xlsx(df, tmp, tabColour = "#4F81BD")) at test-save.R:104:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::write_xlsx(df, tmp, tabColour = "#4F81BD")
10. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:153:3): example ──────────────────────────────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d05c77715c'
Backtrace:
▆
1. ├─testthat::expect_silent(write_xlsx(iris, file = tmp, colNames = TRUE)) at test-save.R:153:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::write_xlsx(iris, file = tmp, colNames = TRUE)
10. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
11. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-save.R:184:3): writing NA, NaN and Inf ──────────────────────────
Error in `wb$add_worksheet("Test1")$add_data(x = x)$save(tmp)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d036c62a18'
Backtrace:
▆
1. └─wb$add_worksheet("Test1")$add_data(x = x)$save(tmp) at test-save.R:184:2
── Error (test-save.R:216:3): writing NA, NaN and Inf ──────────────────────────
Error in `wb$add_worksheet("Test1")$add_data(x = x, na.strings = NULL)$save(tmp)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0182a4ac6'
Backtrace:
▆
1. └─wb$add_worksheet("Test1")$add_data(x = x, na.strings = NULL)$save(tmp) at test-save.R:216:2
── Error (test-save.R:258:3): write cells without data ─────────────────────────
Error in `wb$save(temp)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d038977dec'
Backtrace:
▆
1. └─wb$save(temp) at test-save.R:258:2
── Error (test-wb_functions.R:6:3): wb_to_df ───────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(wb1 <- wb_load(xlsxFile)) at test-wb_functions.R:6:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(xlsxFile)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-wb_functions.R:133:3): select_active_sheet ──────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(...) at test-wb_functions.R:133:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-wb_styles.R:4:3): wb_clone_sheet_style ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-wb_styles.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-Workbook_properties.R:18:3): Workbook properties ────────────────
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d05ba434ff'
Backtrace:
▆
1. └─openxlsx2::write_xlsx(...) at test-Workbook_properties.R:18:2
2. └─openxlsx2::wb_save(wb, path = file, overwrite = overwrite)
3. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-writing_posixct.R:51:3): Writing mixed EDT/EST Posixct with write_data & write_datatable ──
Error in `wb$clone()$save(path = path, overwrite = overwrite)`: Failed to create temporary directory 'D:\\RtmpmkbSgz\workbookTemp_301c6ed01225'
Backtrace:
▆
1. └─openxlsx2::wb_save(wb, xlsxFile, TRUE) at test-writing_posixct.R:51:2
2. └─wb$clone()$save(path = path, overwrite = overwrite)
── Error (test-xl_open.R:4:3): xl_open() works ─────────────────────────────────
Error in `x$clone()$save(temp_xlsx(macros = has_macros))`: Failed to create temporary directory 'D:\\RtmpUr33u7\workbookTemp_22d0429599f'
Backtrace:
▆
1. ├─testthat::expect_warning(...) at test-xl_open.R:4:2
2. │ └─testthat:::expect_condition_matching(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. ├─testthat::expect_s3_class(...)
8. │ └─testthat::quasi_label(enquo(object), arg = "object")
9. │ └─rlang::eval_bare(expr, quo_get_env(quo))
10. └─wb$open(interactive = FALSE)
11. ├─openxlsx2::xl_open(self, interactive = interactive)
12. └─openxlsx2:::xl_open.wbWorkbook(self, interactive = interactive)
13. ├─openxlsx2::xl_open(...)
14. └─x$clone()$save(temp_xlsx(macros = has_macros))
[ FAIL 75 | WARN 26 | SKIP 1 | PASS 496 ]
Error: Test failures
|
I've rebased this on |
About the For example,
I'd suggest to replace the implicit call with an explicit one: xlDir <- dir_create(tmpDir, "_excelXMLRead") # create folder here
on.exit(unlink(xmlDir, recursive = TRUE), add = TRUE) # delete folder afterwards
xmlFiles <- unzip(file, exdir = xmlDir) # folder not created here, already exists |
Thanks, I'm going to test the updated branch with Update: the formatting issues are fixed with the rebasing, the errors left are just related to the creation of testthat output
> # # @gh_issue_263 (rebased) on C:\ (default %TEMP%)
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 897 ]
══ Skipped tests ══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 897 ]
# # @gh_issue_263 (rebased) on D:\ (on root)
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 65 | WARN 1 | SKIP 1 | PASS 581 ]
══ Skipped tests ══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
══ Failed tests ═══════════════════════════════════════════════════════════════════════════════════
── Error (test-class-comment.R:62:3): load comments ────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-class-comment.R:62:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:5:3): read_xlsx from different sources ───────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(xlsxFile) at test-read_sources.R:5:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:29:3): wb_load from different sources ────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-read_sources.R:29:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:44:3): get_date_origin from different sources ────
Error in `unzip(xlsxFile, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::get_date_origin(xlsxFile) at test-read_sources.R:44:2
2. └─utils::unzip(xlsxFile, exdir = xmlDir)
── Error (test-read_sources.R:60:3): read html source without r attribute on cell ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load("https://github.com/JanMarvin/openxlsx2/files/8702731/fichier_complementaire_ccam_descriptive_a_usage_pmsi_2021_v2.xlsx") at test-read_sources.R:60:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:84:3): read <br> node in vml ─────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(wb <- wb_load(temp_file)) at test-read_sources.R:84:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(temp_file)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_sources.R:94:3): encoding ──────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-read_sources.R:94:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-clean_sheet.R:4:3): clean_sheet ─────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsx) at test-clean_sheet.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-cloneWorksheet.R:8:3): clone Worksheet with data ────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = file_name) at test-cloneWorksheet.R:8:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-cloneWorksheet.R:21:3): clone empty Worksheet ───────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = file_name) at test-cloneWorksheet.R:21:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-deleting_tables.R:128:3): Save and load Table Deletion ──────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = temp_file) at test-deleting_tables.R:128:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-fill_merged_cells.R:19:3): fill merged cells ────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-fill_merged_cells.R:19:2
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─openxlsx2::read_xlsx(tmp_file, fillMergedCells = FALSE)
5. └─openxlsx2::wb_to_df(...)
6. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
7. └─utils::unzip(file, exdir = xmlDir)
── Error (test-formulas.R:4:3): load various formulas ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-formulas.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-helper_functions.R:92:3): ws_page_setup example ─────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(tmp) at test-helper_functions.R:92:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:4:3): Loading readTest.xlsx Sheet 1 ──────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:16:3): Loading multiple pivot tables: loadPivotTables.xlsx works ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:16:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:38:3): Load and saving a file with Threaded Comments works ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(wb <- wb_load(fl)) at test-loading_workbook.R:38:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(fl)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:47:3): Read and save file with inlineStr ─────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:47:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:143:3): sheet visibility ─────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-loading_workbook.R:143:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:173:3): additional wb tests ──────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-loading_workbook.R:173:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:244:3): test headerFooter ────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(tmp1) at test-loading_workbook.R:244:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook.R:259:3): load workbook with chartsheet ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(z <- wb_load(fl)) at test-loading_workbook.R:259:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(fl)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-loading_workbook_tables.R:4:3): Tables loaded correctly ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(...) at test-loading_workbook_tables.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:169:3): type = 'expression' work ───────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:169:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:181:3): type = 'duplicated' works ──────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:181:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:201:3): type = 'containsText' works ────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:201:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:220:3): type = 'notContainsText' works ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:220:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:233:3): type = 'beginsWith' works ──────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:233:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:252:3): type = 'endsWith' works ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:252:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:259:3): type = 'colorScale' works ──────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-conditional_formatting.R:259:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:288:3): type = 'databar' works ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:288:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:307:3): type = 'between' works ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:307:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:340:3): type = 'topN' works ────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:340:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:374:3): type = 'bottomN' works ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:374:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:392:3): type as logical operators work ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2 (local) expect_save(wb) at test-conditional_formatting.R:392:2
2. ├─testthat::expect_silent(wb1 <- wb_load(path)) at test-conditional_formatting.R:18:2
3. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
4. │ ├─testthat (local) .capture(...)
5. │ │ ├─withr::with_output_sink(...)
6. │ │ │ └─base::force(code)
7. │ │ ├─base::withCallingHandlers(...)
8. │ │ └─base::withVisible(code)
9. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
10. └─openxlsx2::wb_load(path)
11. └─utils::unzip(file, exdir = xmlDir)
── Error (test-conditional_formatting.R:402:3): colorScale ─────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-conditional_formatting.R:402:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-names.R:20:3): names ────────────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(tmp) at test-names.R:20:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:27:3): Maintaining Named Regions on Load ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_equal(object = get_named_regions(wb), expected = get_named_regions(out_file)) at test-named_regions.R:27:2
2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─openxlsx2::get_named_regions(out_file)
5. └─openxlsx2::wb_load(x)
6. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:60:3): Correctly Loading Named Regions Created in Excel ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-named_regions.R:60:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:117:3): Load names from an Excel file with funky non-region names ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(filename) at test-named_regions.R:117:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:192:3): Missing rows in named regions ───────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-named_regions.R:192:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:265:3): Missing columns in named regions ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(...) at test-named_regions.R:265:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:307:3): Matching Substrings breaks reading named regions ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::get_named_regions(temp_file) at test-named_regions.R:307:2
2. └─openxlsx2::wb_load(x)
3. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:334:3): Read namedRegion from specific sheet ────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_sheet_names(filename) at test-named_regions.R:334:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-named_regions.R:410:5): deprecation test ────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_warning(...) at test-named_regions.R:410:4
2. │ └─testthat:::expect_condition_matching(...)
3. │ └─testthat:::quasi_capture(...)
4. │ ├─testthat (local) .capture(...)
5. │ │ └─base::withCallingHandlers(...)
6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
7. └─openxlsx2::wb_to_df(filename, definedName = "MyRange")
8. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
9. └─utils::unzip(file, exdir = xmlDir)
── Error (test-protect-workbook.R:31:3): Reading protected Workbook ────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file = temp_file) at test-protect-workbook.R:31:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_from_created_wb.R:84:3): Reading NAs and NaN values ────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_equal(read_xlsx(fileName), exp, ignore_attr = TRUE) at test-read_from_created_wb.R:84:2
2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─openxlsx2::read_xlsx(fileName)
5. └─openxlsx2::wb_to_df(...)
6. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
7. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_write_logicals.R:16:3): TRUE, FALSE, NA ────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(fileName, sheet = 1, na.strings = "#N/A") at test-read_write_logicals.R:16:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_xlsx_correct_sheet.R:3:3): read_xlsx correct sheet ─────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_sheet_names(file = fl) at test-read_xlsx_correct_sheet.R:3:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-read_xlsx_random_seed.R:8:3): read_xlsx() does not change random seed ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::read_xlsx(tf) at test-read_xlsx_random_seed.R:8:2
2. └─openxlsx2::wb_to_df(...)
3. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
4. └─utils::unzip(file, exdir = xmlDir)
── Error (test-remove_worksheets.R:29:3): Deleting worksheets ──────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(tempFile) at test-remove_worksheets.R:29:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:4:3): xf ───────────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:40:3): border ──────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:40:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:68:3): cellStyle ───────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:68:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:94:3): tableStyle ──────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:94:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:119:3): dxf ────────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:119:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-styles_xml.R:145:3): colors ─────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(xlsxFile) at test-styles_xml.R:145:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-wb_functions.R:6:3): wb_to_df ───────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─testthat::expect_silent(wb1 <- wb_load(xlsxFile)) at test-wb_functions.R:6:2
2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
3. │ ├─testthat (local) .capture(...)
4. │ │ ├─withr::with_output_sink(...)
5. │ │ │ └─base::force(code)
6. │ │ ├─base::withCallingHandlers(...)
7. │ │ └─base::withVisible(code)
8. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
9. └─openxlsx2::wb_load(xlsxFile)
10. └─utils::unzip(file, exdir = xmlDir)
── Error (test-wb_functions.R:133:3): select_active_sheet ──────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(...) at test-wb_functions.R:133:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-wb_styles.R:4:3): wb_clone_sheet_style ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(fl) at test-wb_styles.R:4:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-Workbook_properties.R:33:3): Workbook properties ────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(temp_file) at test-Workbook_properties.R:33:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-writing_posixct.R:53:3): Writing mixed EDT/EST Posixct with write_data & write_datatable ──
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_to_df(xlsxFile, sheet = "write_data") at test-writing_posixct.R:53:2
2. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
3. └─utils::unzip(file, exdir = xmlDir)
── Error (test-save.R:74:3): write_data2 ───────────────────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. └─openxlsx2::wb_load(file) at test-save.R:74:2
2. └─utils::unzip(file, exdir = xmlDir)
── Error (test-save.R:188:3): writing NA, NaN and Inf ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─base::unname(unlist(wb_to_df(tmp))) at test-save.R:188:2
2. ├─base::unlist(wb_to_df(tmp))
3. └─openxlsx2::wb_to_df(tmp)
4. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
5. └─utils::unzip(file, exdir = xmlDir)
── Error (test-save.R:221:3): writing NA, NaN and Inf ──────────────────────────
Error in `unzip(file, exdir = xmlDir)`: 'exdir' does not exist
Backtrace:
▆
1. ├─base::unname(unlist(attr(wb_to_df(tmp, "Test1"), "tt"))) at test-save.R:221:2
2. ├─base::unlist(attr(wb_to_df(tmp, "Test1"), "tt"))
3. └─openxlsx2::wb_to_df(tmp, "Test1")
4. └─openxlsx2::wb_load(xlsxFile, sheet = sheet, data_only = TRUE)
5. └─utils::unzip(file, exdir = xmlDir)
[ FAIL 65 | WARN 1 | SKIP 1 | PASS 581 ]
Error: Test failures```
</p>
</details> |
Hi, sorry lost track of this issue (and while looking at it I hid your wall of I've rebased once again and added a function to create the required directory explicitly. Though not sure if I got you here correctly. Could you please let me know if this solves the remaining issue(s)? |
(Borat voice) "Great success!" Both test runs (for > tempdir()
[1] "D:\\\\RtmpgBtXrG"
[...]
> test_check("openxlsx2")
Starting 2 test processes
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 957 ]
══ Skipped tests ══════════════════════════════════════════════════════════════════════════════════
• empty test (1)
[ FAIL 0 | WARN 0 | SKIP 1 | PASS 957 ] Thanks for the update! |
Yay! Thanks for testing! Will be merged this week. I'll add a test for this, otherwise it should be fine. |
Thank you very much! |
"Forward-port" ycphs/openxlsx#364 from @christianrickert. Would be super nice, if you could check that this is still sufficient to fix your issue, @christianrickert (it's rather unlikely that I'll ever end up with your specific setup).
A basic command to write a file with
openxlsx2
would be:[Edit:] added
ref
to remotes install.