Datatable content discrepancy when paste onto excel

Hi all,

My workflow is as follows. Basically, it iterates through a table on a web application and extracts the transaction number from it, and adds it into a datatable. When I output the content of the datatable on to the output console, the extracted numbers are all correct. However, when I write the data table into excel and convert them to numbers, some of the last digit of the transaction numbers became wrong.

I have added some pictures for your reference.

(A) This is the table which i iterate through

image

(B) After which, I store them in a datatable and output the content into a message box to check and verify the contents. At this point, all content are correct.

image

(C) I use a write range to write the datable table into an empty excel. In the excel, as the numbers are long, they were printed out like this. When I convert them to number, we can see that for the last digit of those numbers (in red font), they were incorrect.

image

image

Any idea why is this so?

Thanks in advance!

Regards,
Jack

Hi @robot_learner

Try to use Read Range with checked “PreserveFomat”,
and set output cells type to string beforehand.

Hi @wusiyangjia,

Thanks for the help. I found this article which kind of solves the issue by forcing excel format as ‘text’. It works

Thanks!

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