Forum Discussion

dgupta's avatar
dgupta
New Contributor
7 years ago

Excel Parser : reading formatted values instead of the original value

Hi there,

I am using excel file to read the sheet and i am noticing that it is truncating decimals. It reads the formatted column values instead of the actual values…

for example … Value: -123.943661971831 is read as -$123.94

Whereas i want the actual value not the formatted.

6 Replies

  • dmiller's avatar
    dmiller
    Former Employee

    Looks like a defect was submitted for this issue.

  • @dgupta The Excel Parser Snap respects the cell formats present in the input file. The Parser output will look similar to the sheet when opened in Excel, and the Snap performs no additional truncation.

    It seems like the cell referenced is formatted with the Currency type. If you’d like to retain the type, the decimal width needs to be increased to accommodate the additional decimal places. The default decimal width for the Currency type is 2.
    The alternative is to set the cell to use the Number type with decimal width set to Auto. This is probably what you’re looking for since the expected output lacks a $ sign.

  • dgupta's avatar
    dgupta
    New Contributor

    Thanks Rohit. I am interested in reading the original value instead of the formatted value. Is there a way to read it?

    • rohithmadhavan's avatar
      rohithmadhavan
      Employee

      @dgupta Reading values unformatted is not currently possible in the Excel Parser Snap. We are working on adding support for this based on your request.

    • rohithmadhavan's avatar
      rohithmadhavan
      Employee

      @dgupta The Excel Parser Snap now has a new property “Cell formatting” starting with Snap Pack version transform7780 and is available as latest in the UAT and production environments. Setting the property to “Unformatted” should solve your issue.

      • bepelletier's avatar
        bepelletier
        New Contributor II

        Hi there, I still have the same issue pour Excel Parser even when using the unformatted option, the snap returns 72996.84000000001 while it is 72996.84 in Excel. Should I open a ticket in Snaplogic?