Hi Mike,
Thanks for your response.
I am not able to read the version of the Excel application used to create the file. If the file is created using Excel 97 application then I need "Excel 97" string in the java program, if created using Excel XP application then I need "Excel XP" in the program. I only need version of Excel application used to create the file.
Please let me know on how can I get this information.
Thanks,
Hari.
 
----- Original Message -----
Sent: Monday, December 09, 2002 12:19 PM
Subject: Re: Reading Excel File Version from Java

This example will read the file into a string buffer.  You could adapt to whatever you would like to do with the data as it is read.  Hope this helps.
 
Mike
 
 
 
String filepathname = new String("thisisthefilename.xls");       
File uploadedfile = new File(filepathname.trim());
StringBuffer sb = new StringBuffer();
 
try {
    BufferedReader br = new BufferedReader(new FileReader(uploadedfile));
    String stringline = null;
 
    while ((stringline = br.readLine()) != null) {
        sb.append(stringline);
        }
    } catch (IOException e) {
    }
 
 
 
 
----- Original Message -----
Sent: Monday, December 09, 2002 12:00 PM
Subject: Reading Excel File Version from Java

Hi Group,
Could some one tell me on how could I read the excel version used to create the excel file(like Excel XP, Excel 2000, Excel 97, Excel 95) from java.
Thanks,
Hari.

Reply via email to