How do i fix the ##### after write range?

hi guys, after filtering my data and writing it to a new sheet apparently under column (latest expiry, suspend and issue dates) some of the dates become ####### but when i auto fit column width the entire sheet is actually the month and days swapped which caused this problem. Is there a way to fix this? i want it to be dd/mm/yy

Before autofit column width

After autofit column width

Coding

Hi @SIM_JUN_HUI_BERTRAM_CSOD !
It’s alright, just double click twice in B, G and E column right lines and you should be able to see the dates:
image

I mean i able to see the dates after the autofit column width but those with #### the day and month got swapped in the dates. So i probably thinking that the read or write range is causing this problem

Hi @SIM_JUN_HUI_BERTRAM_CSOD

To avoid the ####. U can try to convert the date column into text format

Use this code below to do that uisng invoke code with dt1 as in/out argument.

dt1.AsEnumerable().ToList().ForEach(Sub(row) row(ColumnName)= row(ColumnName).ToString)

Then write it using write range

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed::relaxed:

1 Like

i dont get what you mean where do i put this? So is it invoking a workflow then import a argument with the value of this dt1.AsEnumerable()…

nvm i found out that ticking the preserve format in read range when sending the email fixed the issue

2 Likes

Hi @SIM_JUN_HUI_BERTRAM_CSOD ,

To autofit the column you can use the “AutoFit Columns” activity from BalaReva.Excel.Activities package. like below.

Regards
Balamurugan.S

1 Like

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