How to remove warning in Excel using apache poi in JAVA?
The API now provides a corresponding method
public void addIgnoredErrors(CellRangeAddress region,
IgnoredErrorType... ignoredErrorTypes)
Apparently this is not currently possible with Apache POI. There are a number of bug reports / RFEs on the subject:
https://issues.apache.org/bugzilla/show_bug.cgi?id=58641
https://issues.apache.org/bugzilla/show_bug.cgi?id=54868
https://issues.apache.org/bugzilla/show_bug.cgi?id=46136
The actual attribute (the attribute that says to ignore such warning) exists in the Excel persistent format and is recorded on a per cell basis. It is just that Apache POI doesn't expose it, as far as I can tell from the bug reports.
To give you an idea of what this looks like in Excel's xlsx format:
</worksheet>
...
<ignoredErrors>
<ignoredError sqref="K192 E181 E186" numberStoredAsText="1"/>
</ignoredErrors>
</worksheet>
I've read somewhere that this is persisted only in xlsx
(i.e. OOXML), not in xls
format which means that if and when the Apache POI team implements this it will be in the XSSF package.