While using read range activity i am getting extra empty headers line

While reading my excel I am getting data in this way.
[Column0,Column1,Column2,Column3,Column4,Column5,Column6,Column7,Column8,Column9,Column10,Column11,Column12,Column13,Column14,Column15,Column16,Column17,Column18,Column19,Column20

employee no, employee name,id,

But in my excel employee no ,employee name,id only these headers present do you have any idea why i am getting extra empty headers.

Hi @mettudp075 ,

I believe there are empty cell values in the First row of your Excel as well, and that is why when you want to consider reading the data/table with Add Headers option in Read Range activity, it also reads/Replaces the Empty header values with the Default Header values starting from Column0.

Do note that there cannot be same/empty values in the Column headers of a Datatable and hence the automatic header name assignment is done.

For confirmation, you could provide us with a Screenshot of the First Two rows of your Excel sheet header.

Hello,

The issue here is that the columns in Excel are being initialized, even though they appear empty.

To address this problem, follow these steps:

  1. Copy only the cells containing your data.
  2. Press Ctrl+A to select all cells in your Excel sheet.
  3. Right-click and choose “Delete.”
  4. Paste the data copied in step 1.
  5. Give it another try; you shouldn’t see those extra columns in your datatable.

I hope these steps are helpful.

Hi @mettudp075 ,
can you share image about your file, or your file
I think they maybe hidden columns, merging rows…
regards,

Hey @mettudp075 ,

The issue indicates that your excel sheet has
Hidden Characters or Spaces in the Header Row: Sometimes, invisible characters or leading/trailing spaces in the Excel header row can cause additional columns to be detected. These characters might not be visible in the Excel sheet but can affect the way data is read programmatically.

So what you can do is delete the sheet and create a new sheet with the same data and then read it

If the issue still persisits then whichever blank column you are getting the extra spaces
Manually go to that column in excel → right click ->Delete

Hope it helps you out!

@mettudp075

Even when there is some empty or dummy data present then cell is considered as valid and read…

We can avoid this by giving range like A:C

One more way is after reading use filter datatable and filter only the columns that are needed

cheers

Hi @mettudp075

Try deleting the sheet and Recreate it once again & then try with the your remaining process