The ExampleEventUIserModel class contains a private, local, variable called
bookData. This is the List variable that will be used to hold all of the
data recovered from the workbook. All you need to do is to modify the
ExampleEventUserModel class by adding a single method like this;

public List<List> getBookData() {
    return(this.bookData);
}

and then simply add a call to that method after you have processed all of
the sheets in the workbook;

package xls;

public class LeggiXLSX {
        public static void main(String[] args) throws Exception {
                ExampleEventUserModel howto = new ExampleEventUserModel();
                howto.processAllSheets("file.xlsx");
                List<List> cellContents = howto.getBookData();
        }
} 

that will return a List that holds the contents of all of the cells from
every sheet in the workbook.



--
View this message in context: 
http://apache-poi.1045710.n5.nabble.com/Apache-POI-works-but-it-uses-too-RAM-is-it-a-limit-of-your-library-tp5712425p5712500.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to