Nothing
test_that("cloning Excel worksheets", {
# Create workbooks
wb.xls <- loadWorkbook("resources/testWorkbookCloneSheet.xls", create = FALSE)
wb.xlsx <- loadWorkbook("resources/testWorkbookCloneSheet.xlsx", create = FALSE)
# Check cloning of worksheet (*.xls)
cloneSheet(wb.xls, sheet = "Test1", name = "Clone1")
readWorksheet(wb.xls, sheet = "Clone1")
# Check cloning of worksheet (*.xlsx)
cloneSheet(wb.xlsx, sheet = "Test1", name = "Clone1")
readWorksheet(wb.xlsx, sheet = "Clone1")
# Check that attempting to clone a non-existing worksheet throws an exception (*.xls)
expect_error(cloneSheet(wb.xls, sheet = "NotThere", name = "MyClone"), "IllegalArgumentException")
# Check that attempting to clone a non-existing worksheet throws an exception (*.xlsx)
expect_error(cloneSheet(wb.xlsx, sheet = "NotThere", name = "MyClone"), "IllegalArgumentException")
# Check that attempting to assign an invalid name to a cloned sheet throws an exception (*.xls)
expect_error(cloneSheet(wb.xls, sheet = "Test1", name = "'illegal"), "IllegalArgumentException")
# Check that attempting to assign an invalid name to a cloned sheet throws an exception (*.xlsx)
expect_error(cloneSheet(wb.xlsx, sheet = "Test1", name = "'illegal"), "IllegalArgumentException")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.