Getting the Formatted Text of a field.

Nov 20, 2015 at 10:15 PM
I am reading an existing value from an excel spreadsheet.
        ExcelPackage pack = new ExcelPackage(new FileInfo(@"MoneyTest.xlsx"));
        var sheet = pack.Workbook.Worksheets.First();
        var cell = sheet.Cells[sheet.Dimension.Start.Row + 1, sheet.Dimension.Start.Column];
The value in the cell is "5" and it contains the currency formatting so it displays as "$5.00" in excel.

The above code produces "$0.05" for the cell.Text and "5" for the cell.Value.

Is there a way to read the cell text as "$5.00" instead of "$0.05" without me manually parsing the cell.Value?

Nov 20, 2015 at 10:52 PM
Disregard this. When I initially tested updating the package, I did it wrong. But after trying this again, Nuget package 4.0.4 resolved the issue.