tests/testthat/test.workbook.getReferenceCoordinatesForTable.R

test_that("test.workbook.getReferenceCoordinatesForTable", {
  # Create workbooks
  wb.xlsx <- loadWorkbook("resources/testWorkbookReadTable.xlsx", create = FALSE)

  # Check that querying the reference coordinates of an Excel table works as expected (*.xlsx)
  res <- getReferenceCoordinatesForTable(wb.xlsx, sheet = "Test", table = "TestTable1")
  expect_equal(res, matrix(c(5, 10, 4, 7), ncol = 2))
})

Try the XLConnect package in your browser

Any scripts or data that you put into this service are public.

XLConnect documentation built on Feb. 24, 2026, 9:06 a.m.