Hi,

My question (to anyone out there that might have a clue) is - Is
there any way you can determine if any of these file formats is password
protected? If so, could you please send me some sample code that might help
me? Basically what I want to do is if any of these files is password
protected I ignore them or in the case that they are not I want to be able
to read the content (just the text in these files without any other
formatting information , for now).

Any help would be greatly appreciated!

Thanks,

Kartik

Kartik Money
Software Product Development
Accent Technologies Inc.
1270 Lake Washington Rd
Suite C
Melbourne FL 32935

(T) : (321) 242-7438 x-24
(F) : (321) 242-8629
(E) : [EMAIL PROTECTED]

http://www.accent-technologies.com

-----Original Message-----
From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]
Sent: Monday, July 21, 2003 10:46 PM
To: POI Users List
Subject: Re: Excel File Download using JSP


I think we should move the FAQ all onto the wiki....Then you wouldn't have
to plan.

On 7/21/03 4:38 PM, "Danny Mui" <[EMAIL PROTECTED]> wrote:

> Oh, I also plan to add this to the FAQ sometime soon.
> 
> If you hit "open" it will fail in IE.  Put a, response.reset() somewhere
> before you write it out and that will be fixed.
  
> Andrew Riggin wrote:
> 
>> Dan,
>> 
>> Your code worked!!  Thank you.
>> 
>> Andrew
>> 
>> 
>> 
>>> From: Danny Mui <[EMAIL PROTECTED]>
>>> Reply-To: "POI Users List" <[EMAIL PROTECTED]>
>>> To: POI Users List <[EMAIL PROTECTED]>
>>> Subject: Re: Excel File Download using JSP
>>> Date: Mon, 21 Jul 2003 15:14:29 -0400
>>> 
>>> I don't see where the output is written to the servlet stream so
>>> excel is not receiving the file poi created.
>>> 
>>> wb.write(response.getOutputStream());
>>> 
>>> would probably give you what you're looking for.
>>> 
>>> 
>>> 
>>> Andrew Riggin wrote:
>>> 
>>>> I searched through the entire mailing list looking for an answer to
>>>> my question but couldn't find one.
>>>> Here is the situation:  I have one program that makes excel reports
>>>> from an Access database using POI.  This program saves the reports
>>>> to a Tomcat server on my system.  I have a JSP called DisplayReports
>>>> which uses a JavaBean to find the files on the server and post links
>>>> for each file to another JSP called DownloadFile.  When i link is
>>>> clicked on DisplayReports.jsp, it is suppose to run Downloads.jsp,
>>>> the Open/Save dialog box opens and then it down loads to the user
>>>> specified directory.  The relevant portion of the code in
>>>> Download.jsp looks like this:
>>>> 
>>>> String filepath = dbBean.getDataPath();
>>>>  response.setContentType("APPLICATION/OCTET-STREAM");
>>>>  response.setHeader("Content-Disposition",
>>>>  "attachment; filename=\"" + filename + "\"");
>>>> 
>>>> POIFSFileSystem fs = new POIFSFileSystem(new
>>>> FileInputStream(filepath + filename));
>>>>    HSSFWorkbook wb = new HSSFWorkbook(fs);
>>>>    FileOutputStream fileOut = new FileOutputStream(filename);
>>>> 
>>>> wb.write(fileOut);
>>>>    fileOut.close();
>>>> 
>>>> It downloads the excel workbook with the correct name but their is
>>>> no data and no sheets.  What do I need to add?
>>>> 
>>>> Thanks,
>>>> 
>>>> Andrew
>>>> 
>>>> _________________________________________________________________
>>>> STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
>>>> http://join.msn.com/?page=features/junkmail
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> 
>> 
>> _________________________________________________________________
>> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
>> http://join.msn.com/?page=features/junkmail
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to