TANGO - Excel output bug

Hello Everyone,

For those of you who use TANGO, I was wondering if you have a problem with the excel files that are created? When opening them, excel gives a warning that the file does not match the extension. This creates an issue when trying to import data into another program (i.e. R). So solve this, I have to open and re-save the file. Although this is not a problem on the small scale, but as experiments increase, so do the number of files and I’d like to have the process streamlined.

However, I was wondering if the bug could be prevented in the first place? Perhaps it could even be just exported as a .csv?

Thoughts?

Dustin

Dear @Dustin_Pearson,

The export file of TANGO is basically a csv file, we used the extension .xls because it was the extension used by ImageJ a couple of years ago. We also did not notice this problem when opening the file because we do not use excel but LibreOffice and there is no pb with the file.

I will try to change the extension to .csv and hope to release a updated version soon. If you need a quick fix I can help you write a macro that will change the extension to .csv.

Hope this helps

Best

Thomas

Hello @ThomasBoudier,

Thank you for responding so quickly. If you are willing I would very much like help with a macro. I am still learning what I can do on ImageJ, so any help will be appreciated.

I will also look forward to a new release of TANGO.

Thank you

Dustin

Hi @Dustin_Pearson,

Here a simple macro to copy files from one directory to another and change the extension.

// get input and output directories
dirIn = getDirectory("Choose a Directory for input");
dirOut = getDirectory("Choose a Directory for output");
fs = File.separator;
// get list of files and loop over the files
files = getFileList(dirIn);
for(f=0;f<files.length;f++) {
	file = files[f];
	// if file ends with extension .xls
	if(endsWith(file, ".xls")) {
		// create new file name and copy file to output directory
		fileNew = replace(file, ".xls", ".csv");
		File.copy(dirIn+fs+file, dirOut+fs+fileNew);
	}
}
// done :-)
print("finished");

Best,

Thomas

1 Like

Hi @Dustin_Pearson,

TANGO is updated on Fiji.

Best

Thomas

Thanks so much! The help is really appreciated.

Stay safe

Dustin

Hey @ThomasBoudier,

It appears that the output now has no columns. I have tried opening the csv in both R and excel and both show a loss of all columns, meaning that there is now only one column. Any ideas?

Thank you

Dustin

@ThomasBoudier,

I think I see the issue, the .csv is tab separated and not comma separated. This solved the issue.

Thanks

Dustin