Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-254

some "accounting" data format causes NullPointerException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 3.0.0 RC
    • 2.5.0, 3.0.0 RC
    • ZSS Component

      Problem Description

      if a cell's data format is "accounting" and use other nation dollar symbol (not $NT) e.g. $ English(Australia) or Japanese(Japan), it causes null pointer exception when displaying it, then crashed.

      >>java.lang.NullPointerException
      >>	at org.zkoss.poi.ss.format.CellFormat.getApplicableFormatPart(CellFormat.java:435)
      >>	at org.zkoss.poi.ss.format.CellFormat.apply(CellFormat.java:309)
      >>	at org.zkoss.zss.model.sys.impl.BookHelper.getFormatText(BookHelper.java:1027)
      >>	at org.zkoss.zss.ui.impl.XUtils.getFormatText(XUtils.java:335)
      >>	at org.zkoss.zss.ui.impl.CellFormatHelper.getHtmlStyle(CellFormatHelper.java:89)
      >>	at org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.getCellAttr(Spreadsheet.java:3066)
      >>	at org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.getRangeAttrs(Spreadsheet.java:2912)
      >>	at org.zkoss.zss.ui.Spreadsheet.updateSheetAttributes(Spreadsheet.java:852)
      >>	at org.zkoss.zss.ui.Spreadsheet.setSelectedSheetDirectly(Spreadsheet.java:791)
      >>	at org.zkoss.zss.ui.Spreadsheet.access$42(Spreadsheet.java:769)
      >>	at org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.setSelectedSheetDirectly(Spreadsheet.java:3520)
      >>	at org.zkoss.zss.ui.au.in.SelectSheetCommand.process(SelectSheetCommand.java:79)
      >>	at org.zkoss.zss.ui.Spreadsheet.service(Spreadsheet.java:4712)
      >>	at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:701)
      >>	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1201)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
      >>	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
      >>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      

      Reproducing Steps

      you can use "cell-data" sheet of TestFile2007.xlsx (in attachment) to reproduce it.

            paowang paowang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: