it's me again, at the moment i have to write a code which is reading in numbers from an excel sheet. I found already an example how to do it, but it is not completely working it is saying that i hace to write
Workbook wokrbook = Workbook.getWorkbook(new File("FileName.xls"))
but my java is always telling me, that i have to create a Workbook class or sth similar so i was wondering if some might tell me, what i actually have to do and what it means...
thanks for ur help already
Very vague question. Not sure what you are asking.
Where is the Workbook class defined? Is there doc for it?
If you are getting errors, copy and paste the full text here.
ok, sry, like always... i found this text on the internet, which is describing how to work with java, but i am not really getting into it...
JExcelApi can read an Excel spreadsheet from a file stored on the local filesystem or from some input stream. The first step when reading a spreadsheet from a file or input stream is to create a Workbook. The code fragment below illustrates creating a workbook from a file on the local filesystem.
Workbook workbook = Workbook.getWorkbook(new File("myfile.xls"));
(NOTE: when creating a spreadsheet from a ServletInputStream you must remove the HTTP header information before creating the Workbook object.)
Once you have accessed the workbook, you can use this to access the individual sheets. These are zero indexed - the first sheet being 0, the second sheet being 1, and so on. (You can also use the API to retrieve a sheet by name).
Sheet sheet = workbook.getSheet(0);
Once you have a sheet, you can then start accessing the cells. You can retrieve the cell's contents as a string by using the convenience method getContents(). In the example code below, A1 is a text cell, B2 is numerical value and C2 is a date. The contents of these cells may be accessed as follows
't know exactly what to do with my Workbook and my Sheet... is is ment to be a class or another method and if yes, what is going on in it... i actually haven't written so mcu yet, cos i don't understand the text completly...
i know it is a really long question but maybe u can help me...
thank you so much
Sorry, I don't know anything about the jxl package or the Workbook class.
You'll have to read its API doc to find out how to use it.
Did you read full text of the example you have found from the net? It should be explain well about this.
i read it, but i am not understanding it completely... i mean they are talking about workbooks, i know what it means in generally but not how to handle it... do i have to create another class and then write the different methods in it... and if yes, how do i have to write these methods.... or do u know maybe a really good site on which it is really good explained.. i searched already for hours the net, but i am not finding sth. which is really helping me...