I am downloading an excel file from SAP and it always gets downloaded in a way that the first row is empty and the first 2 columns are also empty like shown below:
I want to remove the first row and the first 2 column from this file so that it looks like below:
Attached is the file
Book1.xlsx (10.4 KB)
give a try on using a read range with range info: C2
the resulting datatable should be as expected and could used for rewriting to an excel
This does the trick, But I need one more help the file format for me is .XLS and when I apply read range activity to this format is get this error :
Read Range: Your stream was neither an OLE2 stream, nor an OOXML stream.
Also I forgot to mention the file has 1st row empty like below which I want to remove :
Hope the below steps would help you resolve this
To read .xls file always use EXCEL activity where use a excel application scope and pass the file path as input
Inside the scope use a READ RANGE activity and there mention the range like this “C2” and get the output as dt
If you are facing issue again then try upgrading the excel package
Go to Design tab → Manage Packages → Project Dependencies → Upgrade UiPath.Excel.Activities
Now to remove that empty row use this activity
Remove Datarow activity
Where mention in property panel like
Rowindex - 0
Now use a WRITE RANGE activity and then pass dt as input and enable add headers property
use excel application scope with “insert/delete columns” and “insert/delete rows” activity.
make sure ChangeMode = “Remove”
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.