Longer variables unable to be written as a number

When I initiate the excel functions, I have a number that has 9 digits. When I run the segment, the results .csv comes back with a scientific number. I have went into the template spreadsheet and it appears to be set as a number. I have ran this countless times with the same results. Does anyone have any clue?
Here is my code:
Groovey
openExcel(“C:\Users\212574348\Desktop\LHT_template.xlsx”);

    ssotable = new com.workfusion.studio.rpa.recorder.api.groovy.RecorderList(getRow("C:\\Users\\212574348\\Desktop\\LHT_template.xlsx", 2));

// newss0 = getCell(“C:\Users\212574348\Desktop\LHT_template.xlsx”, “B2”);
// aoldssoid = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(aoldssoid, “E8”, “”);
// aoldssoid = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(aoldssoid, “.”, “”);
// newss0 = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(newss0, “E8”, “”);
// newss0 = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(newss0, “.”, “”);
// count = (newss0 == null ? 0 : newss0.length()) as BigDecimal;

Bot Task:

    <robotics-flow>
    <robot driver="universal" close-on-completion="false" start-in-private="false">
	    <capability name="SEARCH_ALL_WINDOWS" value="true"/>
        <script><![CDATA[
                            def usern4me = "212574348";
                            def passw0rd = "";
                            def aoldssoid = "";
                            def newss0 = "";
                            def ssotable = com.workfusion.studio.rpa.recorder.api.groovy.RecorderList.valueOf("");
                            def wind0w = "";
                            def count = BigDecimal.valueOf(0);
                            def conflitab = "";

            enableTypeOnScreen();

openExcel(“C:\Users\212574348\Desktop\LHT_template.xlsx”);

    ssotable = new com.workfusion.studio.rpa.recorder.api.groovy.RecorderList(getRow("C:\\Users\\212574348\\Desktop\\LHT_template.xlsx", 2));

// newss0 = getCell(“C:\Users\212574348\Desktop\LHT_template.xlsx”, “B2”);
// aoldssoid = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(aoldssoid, “E8”, “”);
// aoldssoid = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(aoldssoid, “.”, “”);
// newss0 = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(newss0, “E8”, “”);
// newss0 = org.apache.commons.lang3.StringUtils.replaceOnceIgnoreCase(newss0, “.”, “”);
// count = (newss0 == null ? 0 : newss0.length()) as BigDecimal;

@scott_alexander
Please provide a sample excel file and zipped recording here. It can be a short recording just demonstrating your issue.

And please also describe what you expected and what you’ve got. For example: I’ve expected 100000078 but got 100000078.00

sample project.zip (63.0 KB)
Hello Azinchuk!
Thanks for the response. here is the documents you requested. I try and report out a number, I get the scientific variables instead of the actual numbers.

If there is a way around the scientific variable issue, I would really appreciate it!

Thanks in advance!

@scott_alexander,

Thanks a lot for your example, we’ve created an issue for that and will fix it in next releases.

Meanwhile, you can use the following workaround (additional Expression action):

1 Like

Thanks again for this response! I have implemented this work around, and it works fabulously!

hi @scott_alexander - check out the RPAx 2.2 where this issue if solved!
https://kb.workfusion.com/display/RPAe/RPA+Express+2.2.0

1 Like

Hello, I also encounter the same problem when using “Open Spreadsheet” to get range. The variable is “2927875845” however RPA reads it as “2.93E+09”. I tried other methods like substring between (does not work because it doesn’t apply to table). Can you help to check it? Thank you.

Untitled-7.7z (1.2 KB)

Hi @ytwang what version of RPA Express are you using?

The version I am using is 2.0.

Thank you.

We had this issue in earlier versions of RPA Express, but it was fixed for version 2.2.

Please update to the new version, and let us know if you still have this issue after the update.

Thank you.

But since I am using company PC and there is a restriction that we only use version 2.0 company wise. Is there any solution for V2.0?

Try using this workaround in a For Each loop

Thank you for the advice, however it doesn’t work… I guess because it cannot convert a “table”?

You can use a For Each loop and an index to convert each value in a row or column to correct format, and append it to a list

As a result, you will have a list with correct numbers.

I tried and when I paste the number in another Excel file, it shows
[]
[]

Please see my script. Thank you.

Can you share your excel data file to test the script with it?

Please see attached excel file, thank you.

TH PI965 - excel.xlsx (11.3 KB)

You have long numbers in column 2, not 1. So you should use the index 2 in the Number format action.

Thank you for the help. I have changed to “2” but the result is still not correct. Please see my script.
Untitled-7.7z (1.4 KB)

These actions are incorrect in your script. You try to type in the value 0 from a List variable. Numbering of values in a list start with 1, that’s why it doesn’t work.

You can see how to insert all values from a list in an excel file