Write Excel - Rounding integer strand to 100's digit

abevensee
abevensee New Altair Community Member
edited November 5 in Community Q&A
I have a process that ends by writing results to an excel document. The output are account numbers meeting a certain criteria. When viewed through the results port, the entire account number shows up (Ex.1). However when the process ends with the "write excel" operator, it is rounding the account number to the nearest hundred (Ex.2). I have the operator set up to write to .xlsx and show all numerical fields as whole numbers (Ex.3). Any idea what would be causing this or ways to circumvent it?

Thanks!

Ex.1:


Ex.2:


Ex.3:


Best Answer

  • rfuentealba
    rfuentealba New Altair Community Member
    Answer ✓
    Hello @abevensee,

    If you say "account numbers meeting a certain criteria", is it that the account numbers are texts? Because a workaround would be to work with these account numbers as text/string and not as numbers. I can confirm that when generating numbers, those must stay within a range of 15 digits, which is less than ideal for other situations where a number can be large enough to overflow the definition of bigint/decimal.

    Am I doing anything wrong here, @sgenzer ?

    All the best,

    Rod.

Answers

  • rfuentealba
    rfuentealba New Altair Community Member
    Hello @Noel,

    Does the same thing happen if you store the data into a CSV file instead of an Excel one? If you do, it's a limitation coming from the library. I say that because I hadn't any problems with storing data into PostgreSQL with a massive number of decimals. Let's see how it develops from this.

    All the best,

    Rodrigo.
  • abevensee
    abevensee New Altair Community Member
    It does not occur when writing to a CSV. Unfortunately I am writing a multiple tab excel workbook so the excel operator is preferred over the CSV operator in this case. 
  • rfuentealba
    rfuentealba New Altair Community Member
    Answer ✓
    Hello @abevensee,

    If you say "account numbers meeting a certain criteria", is it that the account numbers are texts? Because a workaround would be to work with these account numbers as text/string and not as numbers. I can confirm that when generating numbers, those must stay within a range of 15 digits, which is less than ideal for other situations where a number can be large enough to overflow the definition of bigint/decimal.

    Am I doing anything wrong here, @sgenzer ?

    All the best,

    Rod.