From 2b4020baf71bb4e8f96544609023c790f6ca26a7 Mon Sep 17 00:00:00 2001
From: Avik Sengupta
Date: Fri, 27 Dec 2002 05:44:40 +0000
Subject: [PATCH] new faq on cell styles
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352966 13f79535-47bb-0310-9956-ffa450edef68
---
src/documentation/xdocs/faq.xml | 100 ++++++++++++++++++++++++++------
1 file changed, 83 insertions(+), 17 deletions(-)
diff --git a/src/documentation/xdocs/faq.xml b/src/documentation/xdocs/faq.xml
index 46587108bf..767d96c153 100644
--- a/src/documentation/xdocs/faq.xml
+++ b/src/documentation/xdocs/faq.xml
@@ -66,7 +66,6 @@
Thanks to Jason Hoffman for providing the solution.
+ }
@@ -93,7 +90,7 @@
screen. The problem persists even though you have set the correct mime type.
- The short answer is, dont depend on IE to display a binary file type you an attachment properly if you stream it via a
+ The short answer is, dont depend on IE to display a binary file type properly if you stream it via a
servlet. Every minor version of IE has different bugs on this issue.
@@ -112,9 +109,8 @@
To guarantee opening the file properly in Excel from IE, write out your file to a
temporary file under your web root from your servelet. Then send an http response
- to the browser to do a client side redirection to your temp file. (If you do a
- server side redirect using RequestDispatcher, you will have to add .xls to the
- request as mentioned above.)
+ to the browser to do a client side redirection to your temp file. (Note that using a
+ server side redirect using RequestDispatcher will not be effective in this case)
Note also that when you request a document that is opened with an
@@ -171,25 +167,17 @@
so to support localization you should use Unicode.
To do it you should set it manually:
+ c.setCellValue( "\u0422\u0435\u0441\u0442\u043E\u0432\u0430\u044F" );
Make sure you make the call to setEncoding() before calling setCellValue(), otherwise what you pass in won't be interpreted properly.
@@ -202,4 +190,82 @@
Make sure you have fix pack 4 installed.
+
+ I am using styles when creating a workbook in POI, but Excel refuses to open the file, complaining about "Too Many Styles".
+
+
+
You just create the styles OUTSIDE of the loop in which you create cells.