I would like to remove columns i only need pay no, policy code and payment received. and save the excel file as csv. please assist
So i used this solution but some of the columns were not deleted
I would like to remove columns i only need pay no, policy code and payment received. and save the excel file as csv. please assist
So i used this solution but some of the columns were not deleted
Hi @pabaleloh
=> Read Range Workbook
Output → dt
=> Use below syntax in Assign:
Output_Dt = dt.DefaultView.ToTable(False,{"Pay No","Policy Code","Payment Received"})
Output_Dt is of system.data.datatable datatype.
=> Use Write CSV acitvity to write Output_Dt
back to CSV.
Hope it helps!!
@pravallikapaluri i have to remove the columns before i can upload the excel file…will this solution work for me?
Hi @pabaleloh
Are you using Excel activities or Workbook activities?
Do you want to remove those columns from the original sheet?
Regards
@pravallikapaluri Yes i want to remove them from original sheet i only need the 3 columns
@pabaleloh
Please share the excel with dummy data
Follow this approach.
Define a array of string contains columns to be deleted.
Use For Each to iterate array of columns to be deleted.
Use Delete Column activity inside For Each to delete unwanted columns.
Full solution would look like this.
Thanks,
Ashok
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.