Results 1 to 1 of 1
- 05-03-2011, 06:33 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 52
- Rep Power
- 0
How can i store a data from Excel sheet to an array.
Hi,
I want to Read an Open office excel file(.ods File) and need to fetch record row by row. Is there any method where i can use the data line by line and print it to the file that i have already created.
I want to write the cell.getValue() into Files. Like first row into first File, 2nd Row into 2nd file and So on.....Java Code:public static void ReadOds(File f1) { Writer output = null; int i=1; Sheet sheet; try { sheet = SpreadSheet.createFromFile(f1).getSheet(0); int nColCount = sheet.getColumnCount(); int nRowCount = sheet.getRowCount(); System.out.println("Rows :"+nRowCount); System.out.println("Cols :"+nColCount); MutableCell cell = null; for(int nRowIndex = 0; nRowIndex < nRowCount; nRowIndex++) { cell=sheet.getCellAt(i, nRowIndex); System.out.print(cell.getValue()+ ""); }
please suggest me the way how can i make this simple and how to find the array size dynamically if my data is huge.
Thanks In Advance......
Similar Threads
-
HOw to Store Data in An Array
By deshmukh.niraj04 in forum New To JavaReplies: 4Last Post: 04-06-2011, 04:00 AM -
Creating something that will import weather data into excel sheet
By Yatta in forum New To JavaReplies: 0Last Post: 03-23-2011, 03:46 AM -
problem with reading excel sheet data reading using poi libraries
By sandeepsai17 in forum New To JavaReplies: 5Last Post: 08-21-2009, 11:03 AM -
How to read data from excel and store it in db
By saran123 in forum New To JavaReplies: 5Last Post: 10-03-2008, 10:19 AM -
Save data from Excel sheet to servlet
By chandu.v in forum Java ServletReplies: 2Last Post: 04-10-2008, 01:51 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks