How to maintain Datatable format while writing in Excel

Hi,

I have datatable whose columns headers can contain any “9-10” like header name
So after writing in excel, this header is formatted to “10-Sep” which is incorrect

Does anyone has any solution to maintain the format of DT while writing in excel?

@Shreya_Rao1

May I know from where you are getting this Input data ?

If you are reading data from Excel file using Read Range activity then check Preserve Format option in it and then check once.

Hi @lakshman ,

I tried this but still not working
Below highlighted header is from input file for which I need to preserve the format

and this is how its coming up in output file even after doing what u suggested

Hi @Shreya_Rao1

You can try to change the value in the cell.

use Excel application Scope → Your path

Use Write Cell Activity

Set the Range based on the need

image

Can you share the sample excel file

But the position of that column is not fixed

HI @Shreya_Rao1

Try to change the cell format

Regards
Gokul