Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have two tables and I need to implement one single condition like this :
set errormode=0;
Emp:LOAD Name, ID, LocationFROMTestData.xlsx(ooxml, embedded labels, table is Sheet1);
Std:LOAD Std_ID, Class, DivFROMTestData.xlsx(ooxml, embedded labels, table is Sheet2);
if Scripterror= 11 thenEXIT Script;
ELSE
EXECUTE cmd.exe /c md "A" 2> nul;EXECUTE cmd.exe /c MOVE /Y "TestData.xlsx" "A\";
But above code will move excel even in one table column structure is changed because of one Excel and two sheets.
what change I need to do in script if one source table got error then it will not move whole excel?
Hi,
If I understand you correctly, may be check for errors after loading each table?
IF Scripterror= 11 then
EXIT Script;
ENDIF
IF Scripterror= 11 thenEXIT Script;