Results 1 to 2 of 2
- 08-09-2010, 04:30 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 55
- Rep Power
- 0
Kinda Solved: Problems with jxl api(CSharpJExcel)
I have a problem with this excel api. I can open the workbook fine, open access a specific sheet fine, but when it comes to accessing a certain cell in the sheet.
Spreadsheets created with excel cannot be accessed while sheets created with Microsoft Works can be accessed fine. I thought it had something to do with not having an excel license, but i got one and still i get the same undefined error.
It has nothing to do with language compatibility because i could access the sheet by name with Arabic letters. The problems kicked in when I tried to read the cell. Could anyone help me? Help is much appreciated.
API home: JExcelApi
Ill post the code perhaps it helps.
Left out the rest of the class.Java Code://All classes are properly imported public GasWaterRecordsProcessor(File file){ // Import workbook try{ workbook = Workbook.getWorkbook(file); }catch(Exception e){ javax.swing.JOptionPane.showMessageDialog(null,"Unable to open file"); } // Get desired sheet for import Sheet sheet = workbook.getSheet("كشف"); //Count the number of current records which exist in the chosen spreadsheet. Here is where the exception occurs int cnt = 0; try{ while(!sheet.getCell(1, cnt).getContents().equals(null)){ cnt ++; }} catch(Exception e){javax.swing.JOptionPane.showMessageDialog(null, "Your Microsoft Excel license is inactive \n" + "Possible solutions: \n" + "1. Activate your ms excel license \n" +"2. Use microsoft works spreadsheet as your default spreadsheet program or openOffice.org(for language compatibility).\n" + "\n If this is not the case then please make sure the spreadsheet is the Excel 97-2003 format. A free converter is available at the microsoft website."+ "If it is not then please convert it to the correct format.\n"+"If you still have this broblem please contact your vendor at: 71832630");}Last edited by bayan; 08-10-2010 at 09:05 PM.
- 08-10-2010, 05:28 PM #2
Member
- Join Date
- Apr 2010
- Posts
- 55
- Rep Power
- 0
Similar Threads
-
JAR problems
By Evil Smurf in forum New To JavaReplies: 4Last Post: 09-01-2009, 01:17 AM -
Problems, problems, problems!
By Empower5315 in forum New To JavaReplies: 2Last Post: 08-28-2009, 04:27 AM -
Few Problems Help!
By elad_bj in forum New To JavaReplies: 4Last Post: 04-07-2009, 03:45 AM -
having problems
By pinkdiamondgail in forum New To JavaReplies: 6Last Post: 02-06-2009, 11:35 PM -
Problems with the jar
By Freddie in forum NetBeansReplies: 2Last Post: 05-29-2007, 03:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks