How to change Excel cell format


I am trying to write the date as a string into Excel cell but it is updating as #####, So to overcome this I want to change that cell type as General.

I have tried with conversion of current date format with CDate(Date).ToString(“yyyyMMdd”) which will give correct format but while updating same into excel updating as ####

Hi @nilesh.mahajan ,

Most probably, it is an Autofit issue. I don’t think that is the value. You can simply double click on the column manually and check if the value still remains the same.

Another way to avoid this is to use the Autofit Range Activity.

Let us know if this doesn’t help.

It is not working, I tried

@nilesh.mahajan Please refer below one

@nilesh.mahajan , Could you show us a Screenshot of your Excel file after update ?

Also, when you performed manually was it having the same values (#####) ?

Also, Let us know if you have received any errors when you used the activity.


No Error received.

Now I am thinking to make entire column type as Custom with yyyyMMdd format. If it will work that will also solve my issue.

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