Skip to main content

Read Spreadsheet Displayed Data

Command description

Read the text displayed in the spreadsheet cells rather than the underlying typed values.

Cell formatting can change how a value is displayed. For example, a cell containing 1.234 may display 1.23 when formatted to two decimal places. This command returns the displayed value ("1.23") as text. To retrieve the underlying typed value instead, use Read Spreadsheet Raw Data.

The default openpyxl mode converts the original cell value to text but may not reproduce the exact display formatting used by Office or WPS. To read the displayed text exactly as shown, select Office or WPS in Open or Create Spreadsheet.

Command Input Parameters

input parametersInput parameter typeDescription
Excel ObjectExcelAppSpreadsheet object to read from
Read ModeenumRow, Column, Cell
Row NumberstrOne-based row number; -n means the nth row from the bottom. Required for Row and Cell modes
Column NamestrColumn letter such as A or a one-based column number; -n means the nth column from the right. Required for Column and Cell modes
sheetstrWorksheet name. Defaults to the active worksheet

Command Output Parameters

Output parametersOutput parameter typeDescription
Excel DataanyDisplayed cell data converted to text
tip

The default openpyxl mode does not require the installation of Microsoft Office or Kingsoft WPS.

Example

Copy the data in each sheet to a new sheet

  • Copy the table on the left to the blank table on the right and automatically create a sheet

  • Copy method 1: Copy cell by cell

  • Copy method 2: Copy line by line