imagej / imagej2

Open scientific N-dimensional image processing :microscope: :sparkler:
https://imagej.net/
BSD 2-Clause "Simplified" License
1.19k stars 333 forks source link

How to fix read and write excel #211

Open dczomby opened 6 years ago

dczomby commented 6 years ago

Hello there, i had an issue when i try saving my results by using read and write excel, it always show me an Exception window, and Rename me after writing is done.xlsx never exist anymore. I mean i cant save my measure results into excel. Is there any kind of methods that can fix this macro? or copy manually is the best option? Thanks

(p.s this problem occurs after i reinstall my office 2016) p.p.s i'm sorry for my bad english

(Fiji Is Just) ImageJ 2.0.0-rc-68/1.52e; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 96MB of 2965MB (3%)

java.io.FileNotFoundException: C:\Users\HP\Desktop\Rename me after writing is done.xlsx (The system cannot find the file specified)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
    at Read_and_Write_Excel$ExcelHolder.ensureExcelFileExists(Read_and_Write_Excel.java:311)
    at Read_and_Write_Excel$ExcelHolder.readFileAndOpenWorkbook(Read_and_Write_Excel.java:292)
    at Read_and_Write_Excel.run(Read_and_Write_Excel.java:123)
    at ij.IJ.runUserPlugIn(IJ.java:228)
    at ij.IJ.runPlugIn(IJ.java:192)
    at ij.Executer.runCommand(Executer.java:137)
    at ij.Executer.run(Executer.java:66)
    at java.lang.Thread.run(Thread.java:748)
(Fiji Is Just) ImageJ 2.0.0-rc-68/1.52e; Java 1.8.0_172 [64-bit]; Windows 10 10.0; 97MB of 2965MB (3%)

java.lang.NullPointerException
    at Read_and_Write_Excel.openSheetInWorkbook(Read_and_Write_Excel.java:226)
    at Read_and_Write_Excel.run(Read_and_Write_Excel.java:138)
    at ij.IJ.runUserPlugIn(IJ.java:228)
    at ij.IJ.runPlugIn(IJ.java:192)
    at ij.Executer.runCommand(Executer.java:137)
    at ij.Executer.run(Executer.java:66)
    at java.lang.Thread.run(Thread.java:748)
imagejan commented 6 years ago

Read_and_Write_Excel is an external plugin, so this issue likely belongs here: https://github.com/antinos/Results_To_Excel/issues

@dczomby you can save xls files directly from the results table in ImageJ, via File > Save As.... Is there any specific functionality missing why you'd use the other plugin?

dczomby commented 6 years ago

@imagejan well, i didn't know that such a method can be used, because when i tried to save my results the extension files had .csv code and when i open it by using excel 2016, it make all of my results into single row, like label area mean etc. then the next row below it show my measurements. that's why i intended to keep in touch with this plugin.

Sorry for my late answer, P.S so we need to delete the .csv to .xls then, thank you for your care