Exporting "Results" window to csv in ImageJ / FIJI

Hello all, I am using FIJI version 2.0.0-rc-69/1.52p with Java 1.8.0_66.

From running the analyze particles tool, I have a “Results” window (image attached) and would like to export these results to a csv file so they can be opened on Microsoft Excel.
delete

For some reason if I do File => Save as, a csv file is created, but when I open the file with Excel it is empty. Same if I use the saveAs("Results", filepath) command. Does anyone know what could be causing the issue? I did not have this issue in the past. I know I could manually copy and paste but because I am running multiple images I would prefer it to be automated. Thank you.

@vkg9

Can you copy/paste the exact code you are calling to save the results as a csv file? Or perhaps can you create a Minimal Working Example to share with us to run/test that recreates the issue you see?

For example - this code works fine for me (same version as you - I’m on a Mac) - copy/paste it into the Script Editor - select IJ1 Macro language and run it:

#@ File (label = "Output directory", style = "directory") output

run("Blobs (25K)");
setAutoThreshold("Default");
//run("Threshold...");
run("Create Mask");
run("Analyze Particles...", "display exclude");
saveAs("Results", output + "Results.csv");

*Note - I used a Script Parameter to set the output directory… use them! They are awesome!

Is your filepath correct? Ie - the file is actually being created and saved in the correct place? Perhaps use print() statements to double-check?

1 Like

Sorry to bump an old thread. Just wanted to report I believe the problem was due to a bug in later versions of ImageJ (1.52+). I returned to version 1.51 and it works fine now. The problem also was reported by someone else here.

1 Like