In Excel 2010 it's possible to "format as table" a group of cells - enabling easy sorting and filtering (Home > Format As Table).
Can I do the same in Apache POI? Alternatively, can one accomplish the above directly in Excel via a macro/formula (as opposed to CTRL+T or clicking on a toolbar button)?
There's a fairly new feature in POI that may deliver what you need. Grab a recent nightly/svn build (or wait for POI 3.8 beta 3 in a week or so), and take a look at XSSFTable. You should now be able to add one to a sheet, specify the range it applies to (the range you want to be made a table), and that hopefully will do you. It's quite new though, so you may need to join the POI dev list and help with the development of the feature if it's not quite there for you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With