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

Copy and paste between different workbooks

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • None

      http://code.google.com/p/zkspreadsheet/issues/detail?id=209

      Reported by [email protected], Nov 29, 2010
      The current implementation of Utils.pasteSpecial(....) assumes that both sheets are in the same workbook.
      This means I can't open 2 spreadsheets/files side-by-side and copy-and-paste between them. I get NullPointerException because it is assuming that the workbook is the same for both source-sheet and dest-sheet.

      This would be a very nice enhancement to have, as our application allows for multiple spreadsheets open at a time.

      1. Open 2 windows, each with a different xls file
      2. Copy from one
      3. Paste to the other, using the utils.pasteSpecial

      expect: copied content. Instead, I get a NPE.

      java.lang.NullPointerException
      at org.zkoss.zss.model.impl.BookHelper.getSheet(BookHelper.java:231)
      at org.zkoss.zss.model.impl.RangeImpl.copyRef(RangeImpl.java:925)
      at org.zkoss.zss.model.impl.RangeImpl.copy(RangeImpl.java:882)
      at org.zkoss.zss.model.impl.RangeImpl.paste0(RangeImpl.java:733)
      at org.zkoss.zss.model.impl.RangeImpl.pasteSpecial(RangeImpl.java:645)
      at org.zkoss.zss.ui.impl.Utils.pasteSpecial(Utils.java:161)
      at com.sl.surveyor.ui.spreadsheet.SpreadsheetPanel.onPaste(SpreadsheetPanel.java:194)
      at ...........(SpreadsheetPanel.java:110)

      29-Nov-2010 09:45:07 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1253
      SEVERE: >>java.lang.NullPointerException
      >> at org.zkoss.zss.model.impl.BookHelper.getSheet(BookHelper.java:231)
      >> at org.zkoss.zss.model.impl.RangeImpl.copyRef(RangeImpl.java:925)
      >> at org.zkoss.zss.model.impl.RangeImpl.copy(RangeImpl.java:882)
      >> at org.zkoss.zss.model.impl.RangeImpl.paste0(RangeImpl.java:733)
      >> at org.zkoss.zss.model.impl.RangeImpl.pasteSpecial(RangeImpl.java:645)
      >> at org.zkoss.zss.ui.impl.Utils.pasteSpecial(Utils.java:161)

            Unassigned Unassigned
            henrichen henrichen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: