Loading...

Read and Write Excel Plugin for ImageJ (new version)

2,389 views

Loading...

Loading...

Transcript

The interactive transcript could not be loaded.

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Mar 1, 2018

A tutorial in the use of the 'Read and Write Excel' plugin (v1.1.0) for ImageJ or FIJI (Installation instructions are at the bottom of this description)

Please note: This version contains many new features that have been added by Brenden Kromhout (https://github.com/bkromhout)

By default, this plugin extracts data from the imageJ Results Table and adds it to a sheet-tab "A" in an .xlsx Excel file on the user's desktop. The plugin will create a file named "Rename me after writing is done" on the desktop if none-exists already, and will update this file if it has already been created. Data is added to the latest sheet (created as "A" if the file is new) or to a user specified sheet using a passed argument (see below). Within the latest sheet, data will be added adjacent to previous data. Results Table column headers are added automatically. A row count is added by default but the user can choose to deny this with a passed argument.

This plugin can be called from a macro using:
run("Read and Write Excel");
and it works very well with batching. A major change for v1.1.0, is that, if called slightly differently (see video or go to GitHub), the plugin is now much better at handling large data sets and/or excel files that become large over time.

The title of the most recent open image will now be added as a label for exported results data by default, instead of the first open image. An argument function can also be used to overwrite this, so that the user may provide their own title for each export, e.g.:
run("Read and Write Excel", "dataset_label=This_is_my_new_title");
Please note, the provided title should not contain spaces between words.

OPTIONAL ARGUMENTS will be parsed from the second argument string as follows:
"no_count_column" Prevents the plugin from adding a "Count" column automatically.
"file=" The path to the excel file to use (uses the default desktop file otherwise) Example "file=[/Users/antinos/Desktop/My_file.xlsx]"
will create and/or append the specified file.
"sheet=" Which sheet in the excel file to put the results in. Example "sheet=banana" will create and/or append a sheet named 'banana'.
"dataset_label=" The label to write in the cell above the data in the excel file. Example "dataset_label=My_new_results_data_label" will use the specified title. Strings and numbers can still be fed to the custom title modifier from a loop but avoid introducing spaces e.g "dataset_label=Table_" + I

MULTIPLE ARGUMENTS example:
run("Read and Write Excel", "no_count_column file=[/Users/antinos/Documents/Example_file.xlsx] sheet=Data_sheet_" + i + " dataset_label=Table_" + i);
where i = some_variable. As you can see, spaces are important to delimit arguments, hence us avoiding them within custom fields.

I am aware that another Excel_Writer plugin exists but it did not work for me very well (hence me creating this). I did not consult their source code but did find out about Apache POI(*) from them.

Since Brenden modified the plugin, the code is now a lot neater. Feel free to consult it as per your needs.

(*)This plugin uses the Apache POI api, which is distributed under the terms of the Apache Licence (available from https://poi.apache.org/legal.html). I believe this software to be free and open source.

Version 1.1.0 changes:
1) Brenden Kromhout added the optional argument features mentioned above and described on his GitHub repo
2) Data imported into an .xlsx file is now recognised as either text or numbers automatically
3) An imageJ progress bar is now visible for each export
4) Now using the latest Apache POI releases (3.17)

Author: Anthony Sinadinos and Brenden Kromhout
Platforms: Multi
Category: Input/Output. Export data to file. Batch tested.

Dependencies:
jars/commons-collections4,
jars/xmlbeans.jar,
jars/poi-ooxml.jar,
jars/poi-ooxml-schemas.jar,
jars/poi.jar,
jars/ij.jar

Update site: http://sites.imagej.net/ResultsToExcel

Installation:
- With ImageJ open, navigate to 'Help'
- In the presented drop down menu, then select 'Update...'
- Allow ImageJ to check for updates
- If required, download updates and restart ImageJ as prompted
- Repeat the first two steps = Help..Update...
- This time ImageJ should let you know that there are no updates available
- Click on 'OK' but do not close the 'ImageJ Updater' window that is also open
- In the bottom left of the 'ImageJ Updater' window, find and click on 'Manage update sites'
- In the newly presented 'Manage update sites' window, find and check the 'ResultsToExcel' check box
- Then close the 'Manage update sites' window
- The 'ImageJ Updater' window will now present you with the plugin files for installation
- Press 'Apply changes'
- After the update has been applied successfully, restart ImageJ

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...