DisplayTag
  1. DisplayTag
  2. DISPL-394

code bug in using poi to export to excel

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Export
    • Labels:
      None
    • Application server:
      tomcat

      Description

      When I export to excel, I found that the table header is not displayed properly.
        But the table body is ok.

      I checked the code and found out that if I change the code of method writeHeaderFooter in HssfTableWriter.java
        as the following, it works:
          private void writeHeaderFooter(String value, HSSFRow row, HSSFCellStyle style)
          {
              this.currentCell = row.createCell((short) this.colNum++);
              this.currentCell.setCellStyle(style);
              //cjy
              this.currentCell.setEncoding(HSSFCell.ENCODING_UTF_16);
              this.currentCell.setCellValue(value);
          }

      If it is not a bug, I am really very sorry.

        Activity

        There are no comments yet on this issue.

          People

          • Reporter:
            Brian
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: