diff --git a/NEWS.md b/NEWS.md index 1939dc12..bfddff40 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,9 @@ * add option to save as read only recommended ([#201](https://github.com/ychps/openxlsx/issues/201)) * fixed writing hyperlink formulas ([#200](https://github.com/ychps/openxlsx/issues/200)) * `write.xlsx()` now throws an error if it doesn't have write permissions ([#190](https://github.com/ycphs/openxlsx/issues/190)) +* `Workbook$show()` no longer fails when called in a 0 sheet workbook([#240](https://github.com/ychps/openxlsx/issues/240)) +* `read.xlsx()` again accepts `.xlsm` files ([#205](https://github.com/ychps/openxlsx/issues/205), [#209](https://github.com/ychps/openxlsx/issues/209)) + # openxlsx 4.2.4 diff --git a/tests/testthat/test-Workbook_properties.R b/tests/testthat/test-Workbook_properties.R index d882b98a..86193f0c 100644 --- a/tests/testthat/test-Workbook_properties.R +++ b/tests/testthat/test-Workbook_properties.R @@ -38,3 +38,8 @@ test_that("Workbook properties", { setLastModifiedBy(wb, "Philipp 2") expect_true(grepl("Philipp 2", wb$core)) }) + + +test_that("Workbook can print with 0 sheets [240]", { + expect_error(createWorkbook()$show(), NA) +}) \ No newline at end of file