Cannot Export Tables to Excel
See original GitHub issuePrerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Running the latest version of Constellation
- Attached the Support Package via
Help
>Support Package
- Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ
- Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues
- Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories
Description
In Table View, I try to export a table of data to Excel. It looks like it all works, I save on my Desktop but then nothing actually happens (the document doesn’t appear). I asked a teammate to do the same thing, he went through the same process as I did, and it worked, so not sure what the issue is?
This seems to be an intermittent issue and the exception is:
java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createTempFile(Unknown Source)
at org.apache.poi.util.TempFile$DefaultTempFileCreationStrategy.createTempFile(TempFile.java:105)
at org.apache.poi.util.TempFile.createTempFile(TempFile.java:60)
at org.apache.poi.xssf.streaming.SheetDataWriter.createTempFile(SheetDataWriter.java:80)
at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(SheetDataWriter.java:63)
at org.apache.poi.xssf.streaming.SheetDataWriter.<init>(SheetDataWriter.java:68)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheetDataWriter(SXSSFWorkbook.java:292)
at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:69)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:624)
Caused: java.lang.RuntimeException
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:628)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:645)
at au.gov.asd.tac.constellation.views.tableview2.TableViewUtilities$ExportToExcelFilePlugin.execute(TableViewUtilities.java:191)
at au.gov.asd.tac.constellation.pluginframework.templates.SimplePlugin.run(SimplePlugin.java:65)
[catch] at au.gov.asd.tac.constellation.graph.node.pluginframework.DefaultPluginEnvironment$1.call(DefaultPluginEnvironment.java:125)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Steps to Reproduce
- [First Step]
- [Second Step]
- [and so on…]
Expected behaviour: Tables get exported to an Excel File
Actual behaviour: Tables are not being exported to an Excel File
Reproduces how often: Sometimes
Additional Information
N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Export data to Excel - Microsoft Support
Table or query. Note: Forms and reports cannot be exported without their formatting. All fields and records in the underlying object are exported....
Read more >Error Exporting to Excel | MadgeTech
Error Exporting to Excel · Go to 'Apps & Features' in Windows and find the Microsoft Office entry · Select the entry and...
Read more >Unable to export an attribute table to an Excel file in ArcGIS Pro
Solution or Workaround · Open the ArcGIS Pro project. · In the Contents pane, browse to and right-click the layer. Click Data >...
Read more >How to Export MS Access Table data to Excel Spreadsheet
This video explains how you can export data from MS Access table to excel spreadsheet. MS Access allows to export the entire data...
Read more >Unable to Export output tables to Excel 2007 and higher (*.xlsx)
I am using IBM SPSS Statistics 19 or 20 release and attempting to export a Statistics output table. I have Microsoft Excel 2007...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Basic steps to reproduce:
I searched google for the lower level exception and found the following: https://stackoverflow.com/questions/29285076/java-apache-poi-sxssfworkbook-unable-to-create-sheets
https://bz.apache.org/bugzilla/show_bug.cgi?id=57200
This appears to be the same issue … I will dig into these wider issues and look for a solution. An extract from the second link:
_SXSSF creates a temporary file when its saved using the class org.apache.poi.util.TempFile. When a tempfile is first created, the directory name is saved within this class, in the static singleton DefaultTempFileCreationStrategy object. This directory is only created on the first save and its never checked if this directory still exists, as you can see below:
The directory is automatically deleted when the virtual machine exits. (I believe the directory is also created automatically when you load an xlsx using the event api).
So, if you have two applications both loading and saving excels and you then close one this directory is automatically deleted. Now both applications used exactly the same temp directory. Therefore if you try to save your file in the second application which is still open, an IOException is instead raised as it tries to create the tmp file in the no-longer existing directory. The user cannot save their xlsx any longer._