% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbl.R
\name{tbl_xlsx}
\alias{tbl_xlsx}
\title{Create a lazy table reference from an Excel (.xlsx) file}
\usage{
tbl_xlsx(path, sheet = 1L, batch_size = .DEFAULT_BATCH_SIZE)
}
\arguments{
\item{path}{Path to an \code{.xlsx} file.}

\item{sheet}{Sheet to read: either a name (character) or 1-based index
(integer). Default \code{1L} (first sheet).}

\item{batch_size}{Number of rows per batch (default 65536).}
}
\value{
A \code{vectra_node} object representing a lazy scan of the sheet.
}
\description{
Reads a sheet from an Excel workbook into a vectra node for lazy query
execution. The sheet is read into memory via
\code{\link[openxlsx2:read_xlsx]{openxlsx2::read_xlsx()}} and then converted
to vectra's internal format. Requires the \pkg{openxlsx2} package.
}
\examples{
\donttest{
if (requireNamespace("openxlsx2", quietly = TRUE)) {
  f <- tempfile(fileext = ".xlsx")
  openxlsx2::write_xlsx(mtcars, f)
  node <- tbl_xlsx(f)
  node |> filter(cyl == 6) |> collect()
  unlink(f)
}
}

}
