ns=2;s=DEPRAG Smart/Local/FileAndDirectoryAccess/Excel/DeleteRowFromWorksheet
The command deletes a row from the specified Excel worksheet in the specified path.
In addition to the parameters already explained, the following variables must be created / transferred for the implementation in TwinCAT 3:
VAR
bExcelDeleteRowFromWorksheet : BOOL;
OutputDataDeleteRowFromWorksheet : ST_VoidOutputData;
hrExcelDeleteRowFromWorksheet : HRESULT;
fbExcel : FB_Excel;
END_VAR
hrExcelDeleteRowFromWorksheet := fbExcel.DeleteRowFromWorksheet(
bExecute := bExcelDeleteRowFromWorksheet,
ConnectionHandle := depragSmartConnection.ConnectionHandle,
sFileFullPath := 'C:\Test\TestFile.xlsx',
sWorksheetName := 'Testsheet',
nRowNumber := 1,
OutputData => OutputDataDeleteRowFromWorksheet);
IF hrExcelDeleteRowFromWorksheet <> S_FALSE THEN
bExcelDeleteRowFromWorksheet := 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".