Is Datatable for -Excel data not cleared?

hi All,

I have developed the code. It worked for 2 to 3 months excellent. now i am getting an error.

I have to read the excel file which has 2 columns in sheet1 …
Then add the data columns. I have added them in the code.
Well whats happening is the error i am getting it says - these columns are already present … :frowning:
Processing the data to no has Problem A column named ‘Number’ already belongs to this DataTable.

Well now in the excel u can see the columns are present… If i delete it also i am getting the same error

**sm.xaml (44.7 KB) **

I am pasting the code
But its giving me

Hi,
this is because the columns that you previously transferred has the same column names. So it is not able to add it again. Either you can add without headers or you should clear the old existing column.

@vishal.kp

Actually if those columns are not thre then also some times its throwing those errors…
I am really not understanding… why
Is the Data data is holding the skleton…
Its happening on the Test server machine only

You trying to move from which sheet to which

You can’t add the same column name which is already present in the datatable.
I think , it may be problem in the server machine.

1 Like

Where is your excel file actually stored?..

1 Like

@Manish540

I have sent in the main thread the excel file…
I understand the error message… i know we cant add the same colum…
But this excel file is created freshly every run… So when it creates the excel only 1st and 2nd column will only be there…

for 3 rd and column on words the code should add the Columns to excel… please have a look at the code,
its very small code…
I even added the clear data table too…

As i said initially this same code worked more than 3 months