ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/Excel/ReadAllCellsFromRow
The command reads the values of all cells in a row of the specified Excel worksheet in a specified path.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bExcelReadAllCellsFromRow : BOOL;
OutputDataReadAllCellsFromRow : ST_StringOutputData;
hrExcelReadAllCellsFromRow : HRESULT;
fbExcel : FB_Excel;
END_VAR
hrExcelReadAllCellsFromRow := fbExcel.ReadAllCellsFromRow(
bExecute := bExcelReadAllCellsFromRow,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sFileFullPath := 'C:\Test\TestFile.xlsx',
sWorksheetName := 'Testsheet',
nRowNumber := 1,
Separator := ',',
OutputData => OutputDataReadAllCellsFromRow);
IF hrExcelReadAllCellsFromRow <> S_FALSE THEN
bExcelReadAllCellsFromRow := FALSE;
END_IF
For examples and explanations regarding the calls of nodes via Siemens TIA Portal please refer to the sub-menu "Siemens TIA Portal" in section "Getting Started".