poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "indian scorpio" <cool.scorpi...@gmail.com>
Subject [PLZ read before saying FAQ-13] Some text formatting may have changed...
Date Thu, 13 Mar 2008 09:39:09 GMT
Hi

Error is some text formatting may have changed as maximum number of styles
exceeded...

I am not setting style & font in any loop but this particular function
printToExcel is being called a lot of times but style setting part is done
only for the first row (ie only once for each sheet) of each sheet in the
file (though in one of the sheet no of column exceeds 52..but neways i m not
doing it for each column so it shouldn't rally matter  (could it be coz of
that))

    void printToExcel() {
>         String workBook = null;
>         workBook = java.lang.System.getProperty("abc");
>         if (workBook == null) {
>             return;
>         }
>         int maxRecordAllowed;
>         maxRecordAllowed = Integer.valueOf(
>                 java.lang.System.getProperty("qwer", Integer.toString
> (2000)))
>                 .intValue();
>         java.io.FileOutputStream fileOut = null;
>         HSSFWorkbook wb = null;
>         try {
>             POIFSFileSystem fs = new POIFSFileSystem(
>                     new java.io.FileInputStream(workBook));
>             wb = new HSSFWorkbook(fs);
>         } catch (Exception e) {
>             wb = new HSSFWorkbook();
>         }
>
>         try {
>
>             fileOut = new java.io.FileOutputStream(workBook);
>             HSSFSheet newSheet = null;
>             newSheet = wb.getSheet("xyz");
>
>             font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
>             short rowIndex;
>             HSSFRow row;
>
> *if (newSheet == null) {*
>
*            HSSFFont font;
>             font = wb.createFont();
>             wb.getF
>             font.setFontHeightInPoints((short) 10);
>             font.setFontName("Arial");
> *
> *            HSSFCellStyle style;
>             style = wb.createCellStyle();
>             style.setFont(font);
>             style.setFillForegroundColor(HSSFColor.LEMON_CHIFFON.index);
>             style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); *
>

> * // do something which uses style
>             } else{*
>
*//do something else
> *
>
*} *
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message