Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: Cell.Value throwing System.FormatException

$
0
0
I'm trying to parse an excel, but the cells that have formatted percentage values are throwing System.FormatException when I try to access the their Value.

Here is the string representation of the cell:
 [ClosedXML.Excel.XLCell]: {ClosedXML.Excel.XLCell}
    Active: false
    Address: {B3}
    Comment: {}
    DataType: Number
    DataValidation: {ClosedXML.Excel.XLDataValidation}
    FormulaA1: ""
    FormulaR1C1: ""
    FormulaReference: null
    HasComment: true
    HasDataValidation: false
    HasFormula: false
    HasHyperlink: true
    HasRichText: true
    Hyperlink: {ClosedXML.Excel.XLHyperlink}
    NewDataValidation: {ClosedXML.Excel.XLDataValidation}
    RichText: {10,10%}
    ShareString: true
    Style: {Font:False-False-Single-False-Baseline-False-10-Color Theme: Hyperlink, Tint: 0-Arial-Swiss Fill:Color Index: 64-None-Color Index: 64 Border:Thin-Color Index: 8-None-FF000000-None-FF000000-None-FF000000-None-FF000000-False-False NumberFormat: 10- Alignment: Right-Bottom-0-False-ContextDependent-0-False-0-False- Protection: Locked}
    Value: 'row.Field(SELLING_RATE_INDEX).Value' threw an exception of type 'System.FormatException'
    ValueCached: null
    Worksheet: {'LTN 010113'!A1:XFD1048576}
Any idea why this happens?

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>