Home | How it works | Projects archive | Contact Us
Air Compressor Bot
 
The Career Path of Freelance Programming Jobs 

   Excel File Download

Bidding Time:
15/05/2008 19:39 - 29/05/2008 19:39
Budget:
N/A
Status:
Pending


Job Type:
Java
Description:
Technical Specs: I'm running Tomcat 5.5 on a Windows machine. Running Java 1.5.
This problem is in the main servlet.

Problem: I am converting HTML tables into an actual Microsoft Excel file, with
the .xls extension. This option is more detailed than a CSV file, and does
formatting and colors. That's not the problem, I have that working just fine.
I can create the Excel file and I save it in a folder. I create a random number
to name the file, so the generated Excel file is ultimately saved in the folder
/WEB-INF/savedReports/2002348274243.xls

The problem I'm facing is how to forward the request so that the person
generating the report will download the Excel file properly. I accomplished this
with a CSV file by using this code:
String tableHTML = req.getParameter("tableHTML");
String csv=ExcelParser.convertTableToCSV(tableHTML);
resp.setContentType("APPLICATION/OCTET-STREAM");
resp.setHeader("Content-Disposition",
"attachment;filename=\"report.csv\"");
PrintWriter out = resp.getWriter();
out.write(csv);
out.close();
return;

However, it's a different structure with Excel, because I have a file generated,
not a String. As you see in the sample above, with a CSV file I can flush the
CSV string into the output stream. However, you can't do that with an Excel
file.
The limitations I face are this:
a) The generated files contain confidential information that no one else should
be able to access
b) When a user clicks on the link to download the Excel file, it should pop up
the dialog to Save or Open the Excel file.
Next:
C++ Programmer Required -

Dj Site Customization -

Need A Pro Hit Counter Script -

Whmcs template -

Construction company dynamic Flash site-Main Flash Site -


This project is the proprietary information of . Click here to remove this project from OUR database.
Operating System:
N/A
Database System:
N/A

<<< back

Recent Projects Archive:

Monday - Sunday - Saturday - Friday - Thursday - Wednesday - Tuesday

View all freelance web projects

 
Home | Projects archive | RSS | Resources | Links | Contact Us © 2004-2007 ProjectsList.biz /0.459