Excel Workbook read cell, creates a different value from what is read

Hi,

I am trying to use workbook, which is needed because the Excel Application scope is not an option for this file.

I read the cell as a string value by using ‘preserve format’, because the value in the cell is a datetime. When the value returns, it changes and making it unusable for me.
See image below:

image

Thanks in advance!

Hi,

What would be the result if the preserve format option is unchecked…?

Hi @sirwa

Thank you, but in the video, Excel Application Scope is being used.

Invalid value, because it is a datetime.

@sirwa

Create a variable of generic type and then
Read the value without preserve format…please share the resultwe can try converting it to required date format

Cheers

1 Like

Hi @sirwa

Can you share the excel file?

As per the screenshot the minutes are showing in the date. Since you have preserved the format it is reading the format of the cell which is custom “dd/m/yyyy hh:mm” so it is showing output in UiPath as 17/46/2023 03:46, in this 46 is minutes of the time which is coming due to “dd/mm/yyyy hh:mm” as in UiPath reads the mm as minutes and MM as month i.e “dd/MM/yyyy”. so uncheck the preserve format and also choose the format cell of excel as “dd-mm-yyyy hh:mm” instead of dd/m/yyyy hh:mm. After doing this UiPath will not throw the error mentioned by you i.e. invalid value

Regards

1 Like

Generic Value was the solution, i just had to add assign for the format to be dd/MM/yy hh:mm and it read it correctly. Appreciate the help!

1 Like

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