-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Is it possible to have an api to get the last cell (with value) using ZK Spreadsheet.
btw, you may want to try this
int rowSize = ((SheetImpl)sheet).getMaxRowIndex();
int colSize = ((SheetImpl)sheet).getMaxColumnIndex();
this will give you the last cell been edited or with value
Need some help in reloading the date in tab, the content is an excel sheet whose value comes from mysql db, whenever there is an update in db the data has to be loaded again from the db to the excel sheet when the respective tab is clicked.
sorry for that wrong information...
That function will be release for next version.
(I'm using it now and it was implemented by another man, so I thought it was released in previous version)
The reason of invaildate() won't work here is we check the filename and selected sheet name.
If they're both unchanged, it will not reload data.
One way to do the db update is keeping a boolean field like "isModified" in database.
So you could select the modified data from db and update current spreadsheet when tab is clicked.
Another way you have to add a function in the spreadsheet.java like this function
public void setBookFromStream(InputStream is, String src){ _selectedSheet=null; _selectedSheetId=null; setRowfreeze(-1); setColumnfreeze(-1); _importer = new ExcelImporter(); _src=src; _book = ((ExcelImporter)_importer).importFromStream(is, src); _book.addSSDataListener(_dataListener); _book.addVariableResolver(_variableResolver); _book.addFunctionMapper(_functionMapper); }
spreadsheet.setBookFromStream(iStream, src); spreadsheet.setSelectedSheet(sheetTB.getSelectedTab().getLabel());
Asked: 2009-02-01 10:33:47 +0800
Seen: 264 times
Last updated: Feb 11 '09