#1129 Export table to XLSX does not work

All
closed-fixed
Gerd Wagner
5
2014-08-24
2014-02-02
Marek
No

Hello,

export table to XLSX does not work in Squirrel 3.5.1.

I'm on Win7 64bit, java6.

2014-02-02 17:58:28,709 [AWT-EventQueue-1] ERROR net.sourceforge.squirrel_sql.fw.gui.action.AbstractExportCommand - Failed to write file
C:\Users\IBM_ADMIN\Desktop\tes2.xlsx
Error message
null
See last log entry for details.
java.lang.NullPointerException
at net.sourceforge.squirrel_sql.fw.gui.action.exportData.DataExportExcelWriter.getXlsCell(DataExportExcelWriter.java:76)
at net.sourceforge.squirrel_sql.fw.gui.action.exportData.DataExportExcelWriter.addCell(DataExportExcelWriter.java:187)
at net.sourceforge.squirrel_sql.fw.gui.action.exportData.AbstractDataExportFileWriter.write(AbstractDataExportFileWriter.java:153)
at net.sourceforge.squirrel_sql.fw.gui.action.AbstractExportCommand.writeFile(AbstractExportCommand.java:117)
at net.sourceforge.squirrel_sql.fw.gui.action.AbstractExportCommand.execute(AbstractExportCommand.java:255)
at net.sourceforge.squirrel_sql.fw.gui.TablePopupMenu$ExportCsvAction.actionPerformed(TablePopupMenu.java:417)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2006)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2329)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:398)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:253)
at javax.swing.AbstractButton.doClick(AbstractButton.java:368)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:820)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:861)
at java.awt.Component.processMouseEvent(Component.java:6344)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3286)
at java.awt.Component.processEvent(Component.java:6109)
at java.awt.Container.processEvent(Container.java:2050)
at java.awt.Component.dispatchEventImpl(Component.java:4707)
at java.awt.Container.dispatchEventImpl(Container.java:2108)
at java.awt.Component.dispatchEvent(Component.java:4535)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4586)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4247)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4177)
at java.awt.Container.dispatchEventImpl(Container.java:2094)
at java.awt.Window.dispatchEventImpl(Window.java:2501)
at java.awt.Component.dispatchEvent(Component.java:4535)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:692)
at java.awt.EventQueue.access$400(EventQueue.java:92)
at java.awt.EventQueue$2.run(EventQueue.java:651)
at java.awt.EventQueue$2.run(EventQueue.java:649)
at java.security.AccessController.doPrivileged(AccessController.java:298)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:34)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:46)
at java.awt.EventQueue$3.run(EventQueue.java:665)
at java.awt.EventQueue$3.run(EventQueue.java:663)
at java.security.AccessController.doPrivileged(AccessController.java:298)
at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:662)
at net.sourceforge.squirrel_sql.client.Main$1.dispatchEvent(Main.java:99)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:280)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:195)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:180)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:172)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:133)

2 Attachments

Discussion

  • sfst
    sfst
    2014-02-07

    Same problem with Windows 7 Professional SP1, 32bit, Java: build 1.7.0_51-b13

    Switching the option "Use default formatting" to "Use formatting as configured in Global Prefs" helped a bit. I could export SOME tables (from Oracle) but I could not figure out yet which datatype combination causes the problem.

    Having only strings and numbers worked.
    When there are date columns too, it worked sometimes. But the date is shown as a number in the spreadsheet (LibreOffice).
    The Data Type Control setting "Interpret DATE columns as TIMESTAMP" had no influence.

     
  • Jens Berke
    Jens Berke
    2014-02-26

    I have the same issue (Squirrel SQL 3.5.1, Ubuntu 12.10, Java 7, PostgreSQL 9.1) and played around with different data and types.

    When using the export setting "Use formatting as configured in Global Prefs" it seems like this only happens for columns of numeric, date/time and boolean type containing NULL values (tested with types BOOLEAN, SMALLINT, INTEGER, BIGINT, NUMERIC and TIMESTAMP). TEXT types don't cause the exception.

    When using export setting "Use default formatting" the exception is always thrown, no matter what type or value the columns have,

     
    Last edit: Jens Berke 2014-02-26
  • Gerd Wagner
    Gerd Wagner
    2014-03-18

    • status: open --> closed-fixed
     
  • Gerd Wagner
    Gerd Wagner
    2014-03-18

    Fixed in our Git repository. Will be available in future snapshots an versions