Trouble writing to excel for date format

I did use with the scope. Same result.

As mentioned, the only way I could make it works correctly is to write range with the scope first to trigger other fields in the spreadsheet and then use write range workbook to re write the data table one more time to get all correct into excel.

@Ryan_Nguyen

Can you share the screenshots of your workflow?

Hi Ryan,

I don’t know if it’s the best solution but did you try to write your dates with ’ in the beginning? For example:

“'” + yourDate

By putting ’ , Excel will not interpret the text after.
This tip solved me with numbers, hope it will solve your issue :slight_smile:

Good luck!

Are you open to use interop code inside invoke code activity to change the alignment ?

how did you resolve this issue

i just appended a space with the variable while writing it to excel and it worked
Capture

1 Like

You can use Format Cells Activity inside your excel scope, using your sheet as the source range and using text as Category. This will format al the columns as text and then you can dump your table on the Excel sheet with no changes in the date’s format.

1 Like