Learn R Programming

xlsx (version 0.1.1)

Row: Functions to manipulate rows of a worksheet.

Description

Functions to manipulate rows of a worksheet.

Usage

createRow(sheet, rowIndex=1:5)

getRows(sheet, rowIndex=NULL)

Arguments

sheet
a workbook object as returned by createSheet or subsetting getSheets.
rowIndex
a numeric vector specifying the index of rows to create. For getRows, a NULL value will return all non empty rows.

Value

  • A list of java object references each pointing to a row. The list is named with the row number.

See Also

To extract the cells from a given row, see Cell.

Examples

Run this code
file <- system.file("tests", "test_import.xlsx", package = "xlsx")

wb <- loadWorkbook(file)  
sheets <- getSheets(wb)

sheet <- sheets[[2]]  
rows  <- getRows(sheet)  # get all the rows

# see all the available java methods that you can call
.jmethods(rows[[1]])

# for example
rows[[1]]$getRowNum()   # zero based index in Java

Run the code above in your browser using DataLab