Hi everyone. My issue is the following: i have an excel workbook and use a read range activity to output in a data table dt1. I’m trying to make another data table dt2 with the same structure as dt1 but keep only the headers and write them in another excel workbook. i did the following:
Read Range Activity - Input:Excel Workbook 1 Output: dt1
Assign activity - dt2 = dt1.clone()
Write Range Activity - Excel Workbook 2
The Excel Workbook 2 is empty without any headers.
I need to mention the fact that in both read range and write range activity the “Add Headers” option is ticked.
Hi welcome to the community!
Take a look more closely at your process and your write range, it should work fine… BUT if you dont have any data in dt2, you should not write anything
the Excel 1 has data and headers. After cloning the dt1 which is the output of the excel 1 reading, dt2 should have its structure but when writing in Excel 2 it’s empty, no headers whatsoever. i don’t understand what i’m doing wrong.
you are not doing anything wrong, but you did not understand what i told you… since dt2 has not data, write range wont do anything… why would you go this way if you only want a new excel sheet with the headers, you can just use write cell with each column name instead…
or just add an empty row in your dt2
Oh, now i get you. After the clone, even though it preserves the structure, since it’s empty when i do the write range it writes nothing, not even the headers right?