We have a bot designed to pull data from an oracle database and update values in a Google Sheet based on a unique search term. The search term is the header_id number from the oracle database. This int value is 17 digits long, an example is 20221024013456206. When using SQL developer, I can see all the int values properly. However, when I output the header_id for each row in UiPath studio it is returning in scientific notation, for example, the int 20221024013456206 gets changed to 2.0221024013456002e16. How can I get the values from the database output in int format and not scientific format?
The reason I am asking for help is that we are seeing that if we convert the scientific format into int format, some integers are changed. For example, the output data in Studio comes as 2.02210240134565e16 but the actual number in the oracle database is 20221024013456499.
We are using the UiPath.Gsuite package activities. Inside the GSuite application scope, we are using the write cell activity. However, the issue is not related to Gsuite. It is related to UiPath retrieving data from a database and converting the 17 digit number into scientific notation. When we loop through the data returned by the database, we added a write line to display the number, it is in scientific notation. So there is an issue on the Studio side
This doesn’t actually mean it would enter it in scientific notation into the Google Sheet. Have you actually done that step of writing into the Google Sheet - to see what format it ends up? It could just be the write line that’s converting it (by the way you should be using Log Message not write line).
After the data is retrieved, I did a log message and a write line. In both cases, it displays the number in scientific notation.
I have also written the data into excel and tried to use Format cells. When I use format cells, for some reason excel removed the last few digits and replaces them with 0s. So writing to excel does not work
Yes, I have actually done the step to write into Google Sheets and it enters the numbers in scientific notation. Using format cells in Google Sheets also does not work, the numbers remain in scientific notation regardless of the format I change the cell/column. I have used both log messages and write line activities, in both cases the numbers is displayed in scientific notation
Run it in debug mode with a breakpoint just after the original data is read then look in the debug panel to see what the values are. Need to figure out if the conversion is happening on read, or on write.
Again, we need to know if it’s happening at output or is what is being stored. Put a breakpoint on the activity just after you read the data, run in Debug, and when it pauses at the breakpoint look at the value in the debug panel. What’s the datatype of the variable?