Parse xlsx file
Posted: Fri Feb 04, 2011 4:41 am
Hi everybody! I'm a docx4j library newbie and I need to parse an xlsx file. I'm looking for some example in order to do it. I've already read these examples http://dev.plutext.org/trac/docx4j/brow ... 4j/samples but I haven't found what I need.
I've got an xlsx file (of course!). This file has 4 columns and some rows. What I have to do is
1) load the file
2) print the data found in each cell
This is my code:
I'm able to load the file but I don't know how to continue. Thanks for your help!
David
I've got an xlsx file (of course!). This file has 4 columns and some rows. What I have to do is
1) load the file
2) print the data found in each cell
This is my code:
- Code: Select all
public class test {
/**
* @param args
* @throws Docx4JException
*/
public static void main(String[] args){
// TODO Auto-generated method stub
try {
SpreadsheetMLPackage spread = SpreadsheetMLPackage.load(new java.io.File("path\file.xlsx"));
} catch (Docx4JException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
I'm able to load the file but I don't know how to continue. Thanks for your help!
David