Hi, I need to write values into Excel cells. I don't have much control over these values as they come from an external source via XML (so all of them are Strings).
Most of the time it works fine for me however sometimes Excel is trying to be too smart and displays the dreaded green triangles, like the one for "Number Stored as Text": "The number in this cell is formatted as a number or preceded by an apostrophe" -> "Convert to Number" / "Ignore Error". I would like to programmatically (via POI) set the Ignore property for cell errors to True. In VBA it looks like this: cell.Errors.Item(xlNumberAsText).Ignore = True More info: http://msdn.microsoft.com/en-us/library/bb223803.aspx http://msdn.microsoft.com/en-us/library/microsoft.office.tools.excel.namedrange.errors.aspx How do I go about that in POI? Being smart about cell types (e.g. trying to detect integers and write them as such) is not really an option for me -- the values from the external source can have really fancy formatting and I can never be sure what will trigger Excel's filters. Let alone the unneeded code complexity. So, is there any way to set cell error ignoring in POI? Kind regards, r. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
