Count columns and copy from another excel

Hi, i have an excel file with data and I don’t know how many columns. i need to count columns and copy column data from another excel to the first one.

Hi @markosc .

For counting columns we can use

dtTable.columns.count

And for copying if you can you explain little more with sample files.

Thanks

Table with black borders I have to count, and with red borders are newly added columns from another Excel file

@markosc

Please try this steps and let me know,

  1. Read the excel data using read range (the red bordered from excel file) and store it in datatable - dtTable1 (variable name)

  2. Read the 2nd Excel using another read range and store it in datatable - dtTable2 (variable name)

  3. Use the component given in below link to convert number to excel letter.

Activity name - Get column name

Input will be dtTable2.columns.count
(Output of the activity colname)

  1. Use write range and give sheet name and range as colname + “1” and pass datatable as dtTable1

Thanks

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.