Skip to main content

Hi everyone, I hope you’re doing well.

I am automating an Excel file using Automation Anywhere (AA). During the process, the bot is configured to apply a custom cell format dd/mm/yyyy. For example, if the date entered is 10/30/2024, it is correctly formatted in the cell.

However, after the bot execution is complete and I open the file manually, an issue arises: the leading zero disappears in some dates. For instance, the date that should be formatted as 10/03/2024 appears in the cell as 1/3/224.

It’s important to note that this issue only occurs in one specific worksheet. The other four worksheets in the file retain the correct format and data entered.

Could anyone help me identify the cause of this issue and how to resolve it? I’d really appreciate any guidance or suggestions.

Thank you very much in advance for your help!

Try formatting just that one cell to General and see what it contains. For 10/03/2024 (dd/mm/yyyy), it should report the number 45361.

If it contains 45568, then the day and month were reversed in this worksheet (mm/dd/yyyy).

Excel doesn’t support the year 224 so it really must be some sort of formatting issue in that worksheet.


When in debug mode, if you put a breakpoint right before you write out to the excel file, does the variable containing the date look the way you would expect it to?


Reply