Oh, I don't think there is a way to remove multiple columns at once using default commands. If they are already in an Excel file, you could try executing a VBA macro on the file. If you have a Data Table and only write to Excel later, I suggest you remove one column per time using the command you already found if there aren't any issues with that. It should be an instant operation.
------------------------------
Vinicius Marques
------------------------------
Original Message:
Sent: Thu March 07, 2024 03:14 PM
From: Alex Virrueta
Subject: Delete rows
Hi Vinicius,
I can delete rwos from the data table and write them in a new sheet of my spreadsheet.
Now I want to delete columns, more than one, is there any command to perform this action?, Delete Columno only deletes 1 column at once.
Thanks for your help
Regards
------------------------------
Alex Virrueta
Original Message:
Sent: Sat March 02, 2024 01:06 PM
From: Vinicius Marques
Subject: Delete rows
Hi Alex,
From what I can see, you are missing a command to write the filtered Data Table to the Excel file. Adding a Create from Data Table command right after deleteRows should make it run as you expect. The deleteRows command only filters the Data Table in the specified variable, it does not update the Excel file, that is why adding a command to write to the Excel file should fix it.
------------------------------
Vinicius Marques
Original Message:
Sent: Thu February 15, 2024 01:04 PM
From: Alex Virrueta
Subject: Delete rows
Hi,
My bot is traying to delete a row, bot it does not working, after this I opened the file and the row still there.
This is the script:
defVar --name empleados --type Excel
defVar --name trabajadores --type DataTable
defVar --name cantidad --type Numeric
excelOpen --file "C:\\Users\\EfectivaVPN\\Downloads\\AlexVirrueta\\employees.xlsx" empleados=value
excelGetTable --file ${empleados} --getfirstsheet --entiretable --hasheaders trabajadores=value
deleteRows --where "Name= \'Ned\'" --dataTable ${trabajadores} cantidad=changedrowscount
logMessage --message "${cantidad}" --type "Info"
excelClose --file ${empleados} --save
Thanks for your help
------------------------------
Alex Virrueta
------------------------------