Copy contents in repeated sections in excel worksheet

yes I think so…

@jac_q

but you are looping through same table and trying to add to same table for every row

cheers

sorry I don’t get it. So how should I code the add data row activity?

@jac_q

I hope your datatable contains information of one table alone right?(Because you would have already know start and end cells so…use range to read only those rows)

Once you get the datatable you have to use add data column column activity to it for adding section details

Then use assign dt.Columns(“SectionColumnname”).Expression = “‘Give sectionname here’”

This will give a table with section name for one section…All the above steps are to be repeated for each section and then use merge datatable to merge all of them

cheers

For the assign activity, I get the following error. Can you advise where I went wrong?

@jac_q

It says either the datatable ia empty or the column is not present…can you please check that

Cheers

I have added a data column. Did I miss something?

@jac_q

After add column you have this assign?

Oww…i saw whats wrong…if you give A between double quotes it takes it as a column name on the right…to give a constant name…give that value between single quotes surrounded by double quotes

"’A’"

Cheers

See the single and double quotes here

If adding string variable then

"’" + variable + "’"

Cheers

Thanks for spotting the error. I’ve included the single quotes, however, the programme still doesn’t write the constant name. May I send you my files and seek your assistance to troubleshoot please?

@jac_q

Yes please…please attach the file and project

Cheers

Thanks in advance!
Main.xaml (23.7 KB)
excel.xls (45.5 KB)

@jac_q

Isee that after build data you did not add any rows to the datatable so there is no data hence you cannot add data to queue column as well.

cheers

Further down the workflow, I have added a read range activity which will output to the data table so the programme is able to add data to my excel file.

1 Like

I’ve managed to solve it! Thanks for all your assistance!

1 Like

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