On Thu, 23 Jan 2014, Johannes Kinscher wrote:
The reason I'm writing is that I'm using POI now for more than two years and I'd like to make some improvements to the API regarding spreadsheets (XSSF/HSSF). The problem in most cases is, that the API contains non-intuitive ways of doing things regarding to the current default usage of APIs (>=Java 1.5).
POI is over 10 years old, and has a fairly good backwards compatibility policy, so that isn't all that surprising. Non-major fixes are always welcome!
- convert short parameters to int to remove bulky short casts
Most things ought to be int now, with the short version deprecated. They used to be short to match how the value mapped onto the file format, but we can do that conversion ourselves. If you find cases where we still have the short but not the int, do please do a patch to deprecate the short one and add the int
- create enums for constants (e.g. BorderStyle) and change parameter types for methods to use it
What do we do for files which don't have one of the standard values though? (We know what the documented values are, but that doesn't mean those are the only ones that can ever exist... Real files can be pesky!)
- convert fields to real enums (e.g. Row.CREATE_NULL_AS_BLANK which should be Cell.CREATE_NULL_AS_BLANK anyhow)
I think that's on row, as it's the row you're telling about the cell policy to. Might be good to do something similar for fetching rows from sheets though, so maybe we could come up with a general way to do it?
- advance interfaces (e.g. Color with no methods) to simplify HSSF/XSSF usage
Where they're the same, that'd be great. Please do open bugs for these cases!
However, there are some cases when the .xls and .xlsx formats have very different handling of a given concept, in which case you might find there's little we can do. Worth reviewing though, if you have the time.
- create range operations, e.g. cellRangeAddress.forEach(CellMethod)
This one looks interesting, might be good if you could stub out something about how this might work (perhaps a few lines of documentation and a unit test?), then post that for people to comment on?
I'd like to ask about your opinion of these changes and the future plans of the XSSF/HSSF support (if they already include and/or conflict with some of these changes).
We're all volunteers here, so we all work on things that matter to our day jobs, and to things that interest us personally. There's no project manager setting a strategy, just people toiling away on things they think matter, and things they find fun/interesting/challenging!
Nick --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
