Ho w to delete row in excel

Hi All,

I am converting csv to xlsx file after that i want to delete first row in excel. i used delete range, delete rows send hot keys but unable to delete. Its giving me an error like file is read only mode. Can some one help on this

image

@thima- Have you tried this: https://activities.uipath.com/docs/excel-insert-delete-rows

Yes tried no use

@thima,

How are you converting csv to excel?

Do this steps:

  1. Read csv and store it in a data table.
  2. Then use index to delete the entire first row
  3. So your data table won’t have the first row. Then try to write it in excel.

Hope this will help

1 Like

@thima

You can use this one

Datatable_variable.AsEnumerable.skip(1).copytodatatable

Thanks,
Aman.

Ok I will try it

@thima

Or else you can use Remove Data row activity if you want to delete first row of your datatable, make sure when you are reading your datatable uncheck the add headers

In remove datarow activity pass your row index as 0

Thanks,
Aman sheik