tags:

views:

22

answers:

1

Hi,

There is a requirement to read multiple Excel "Lists" from one sheet in an Excel file. I need to know if there is an inbuilt method/api to obtain the dimensions of a list or deal with list specific data. At the bare minimum, is there a way of knowing the "headers" of the list and the number of rows contained in the list data?

I want the POI wrapper that I am writing to be aware of the data elements on the excel, rather than being told through properties/constants or worse; hardcoding the names of the headers/size of the list.

Regards, Vinu PS: No idea whether the question made any sense...but anyone who gets my drift...please!

+1  A: 

I've just written something to do this. AFAIK, Poi itself doesn't understand lists/tables, but you can easily write a wrapper that does. Alternatively, there is the jxls project - this allows complex mappings from POJOs to spreadsheets, and has table reader functionality.

How to: Excel Files has a number of links to projects that might be useful, including an Excel JDBC driver.

mdma