Copy DataTable and keep format column

I need to add a data table to an Excel file. I do this with the append range activity. The problem is that the new rows added do not respect the file format. How can I make each column respect its data format without using the Excel app scope?

Can you try pre formatting the columns and then appending range

@alexis.mendoza.rpa

Is the formatting present on all rows of columns?

ideally it must be if not select and format them as needed and then write

cheers

Hi @alexis.mendoza.rpa

Formatting is not preserved when using append range without excel App Scope. convert data to formatted strings or use a template file with predefined formats.

Happy Automation

How can I do this?

Each column varies in the format that must be followed.
Some have a date format, others a currency format, others a number format, and others a general format.

It didn’t work, it pastes everything as a general format

The format for multiple columns varies, but is displayed in all cells in that column.

@alexis.mendoza.rpa

You mean for row it varies or column

If columns vary then for each columngive the format as need

If row then change as per row but order might not be same then you might need to go with vba or format cells activity

Cheers

Good day,

I think best way would be to read the data of the excel into data table and appending the new data to it and then writing it using write range would do the gag.
I hope it helps.

Would it read the Excel file, then use the merge data table activity?

The question is, how do I format each column?
Without using Excel app scope activities

Yes, merge the data table created from excel and the new one to form a single data table and then write it. It’ll keep the data in uni-formated structure.
Cheers!

@alexis.mendoza.rpa

the answer was to have a formatted template already

if you dont want to do that of if it does not work then you need to use app scope

cheers

It works half-heartedly. It says that if it retains the format but does not reflect it so that it can be adjusted, I have to click on the cell. In addition, when writing the rows that should go to the end, write them all the way down.