Export from JSP to MS Excel/Word
Hello guys (sorry for length - it is my first question),
I have a problem that I can't solve. I was making various exports from JSP pages (data from dynamicaly maded tables) to MS Word/Excel.
And it was very easy because I got always how reports must look in MS Word or Excel, and after that I saved from Word/Excel that file like a "Web page" so I got HTML file (with ugly code and lot of XML in it - Microsoft maded).
Then I rename that page to JSP, put dynamicaly data where I had to and put and also, a header at the top of that file:
<%@ page contentType="application/vnd.ms-excel" %>
So when I click on my browser (IE) to make that report it opens that JSP file I created (with that heade)r and it offer me automatically to open/save that file (as I am downloading it) to my disk. For IE6 you must first make him to ask you that question but it is not important.
When I save that .xls or .doc file on my disk and try to open it than in MS Word/Excel 2000 and below it asks me security question to choose Yes/No/Cancel (security danger) for downloading images my document needs (that is because I can't put images directly in Word/Excel with Java/JSP - I can only put links - it was like this when saving Word document as HTML file from Word). And this is MS Word/Excel system warning message.
I achieve to override that message but only on MS Word/Excel XP (when putting absolute path to that server image directory - it is possible because it will be Intranet application and I need only to share server's drive and than to link absolute path to these images).
Anybody knows how to avoid that message in MS Word/Excel 2000 and bellow?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center