Johny Talker

Greenhorn
+ Follow
since Jan 26, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Johny Talker

Hi everybody,

As per my requirement, I have to read session-timeout defined in web.xml file under tag <session-config> t </session-config> into my JSP using javascript code.
Any idea about this ?
5 years ago
JSP
Hi All,
Thanks a lot for your inputs....

Finally problem resolved. I uses Aspose API for that and it works fine.
5 years ago
Hi,

Does anyone know how to use SmartXLS-API or Aspose-API ?
I found that Aspose can fulfill these requirement but I am not able to write the code to use it .....
So if anybody having any idea about it, please share it ..

Thanks
5 years ago
But when i save the file(Excel 2007) as 97-03, my code is working fine ...
as per my code line :
String fileName = "C:/Documents and Settings/abc/Desktop/Book.xls"; ------ its working file after saving file in 97-03


While when i change it to :
String fileName = "C:/Documents and Settings/ysingh/Desktop/Book.xlsx"; ------- its giving java.io.FileNotFoundExceptionThe system cannot find the file specified)




but still it doesn't meet the requirement as i have to read an xlsx-file, not xls.
5 years ago
Hi Tim,

I even tried to code using POI-3.2-FINAL-20081019.jar but again not successful. But I got to know that It has to do something with version of MS-Office file.
I am getting the following error while giving the extension as XLS :

org.apache.poi.poifs.filesystem.OfficeXmlFileException: The supplied data appears to be in the Office 2007+ XML. POI only supports OLE2 Office documents
at org.apache.poi.poifs.storage.HeaderBlockReader.<init>(HeaderBlockReader.java:108)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:151)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:312)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:293)
at readPOI.readDataToExcelFile(readPOI.java:18)
at readPOI.main(readPOI.java:12)


And when giving file extension as XLSX :

java.io.FileNotFoundException: C:\Documents and Settings\abc\Desktop\Book1.xls (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at readPOI.readDataToExcelFile(readPOI.java:17)
at readPOI.main(readPOI.java:12)

Anyone having any idea what's going on ....
5 years ago
Is this error having any relation to MS-Office version? As I am using MSOffice 2007, while jdk 1.4 supports only upto 2003. (point out if i am wrong).

IF JExcel-API doesn't supports jdk1.4, then what is alternative to do this using jdk 1.4
5 years ago
Hi,
Now my code looks like the following :

I have included jxl.jar and using jdk 1.4 . And I am using MS-Office 2007. But while running my code, I am getting following erroe message:

java.lang.UnsupportedClassVersionError: jxl/read/biff/BiffException (Unsupported major.minor version 50.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"



Any idea about this?

[moderator edit: added code tags]
5 years ago
Hi Tim, Thanks for reply.

I have got code for the same using POI-3.5 but as i have mentioned, I need to implement this requirement using jdk 1.4 which is mandatory . So it will be helpful, if you can help me to do this using jdk 1.4
Is there any API with tutorial for this which supports jdk 1.4 ?
thanks once again for your time ...
5 years ago
Thnaks for your reply....

But I am little bit confuse about this scenario . Such as do I need to create a xlsx file and what type of code should be in java file...
Any tutorial or code for similar scenario link would be be highly appreciated...

Thanks once again
5 years ago
Thanks a lot for reply .....

But can you give me some more information about it .... such as do i need to create a xlsx file ?
Do you have any weblink or document which can help me to understand it.....
5 years ago
Hi Experts,

I want to create a local java file to read a xlsx-file . I have gone through some code such as using POI-3.5 (which is for jdk 1.5) but I want to do it using jdk 1.4.
Can anyone help me into this ?
Thanks in advance
5 years ago
Hi Experts,

I want to create a local java file to read a xlsx-file . I have gone through some code such as using POI-3.5 (which is for jdk 1.5) but I want to do it using jdk 1.4.
Can anyone help me into this ? Waiting for your response ...
Thanks in advance
5 years ago
JSP
Hi Experts,

I want to create a local java file to read a xlsx-file . I have gone through some code such as using POI-3.5 (which is for jdk 1.5) but I want to do it using jdk 1.4.
Can anyone help me into this ?
Thanks in advance
5 years ago