How to read the entire results table as a string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to read the entire results table as a string

Stein Rørvik
Hello,

In the macro language there is a very useful function
"String.getResultsHeadings" which returns the Results headers.

Is there a similar way I can read the remaining content of the results table as a single string
(with or without the header) as a simple macro or JavaScript call?

Like "String.getResultsContent" for results without header, or "String.getResults" for the entire table?

Yes I know I can make a macro that parses the table row by row, column by column in a double loop and assemble a string from this, but I am looking for a simpler way. What I want to do is to add some lines of custom header information at the start of the file, before saving the results table; that would be super-easy with such commands as suggested above.

Stein


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to read the entire results table as a string

Herbie
Good day Stein,

would

String.copyResults;
str = String.paste;
print(str);

help?

Regards

Herbie



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to read the entire results table as a string

Gabriel Landini
On Wednesday, 20 December 2017 10:39:13 GMT [hidden email] wrote:
> would
> String.copyResults;
> str = String.paste;
> print(str);
>
> help?

Also the macro function split(string, delimiters) should be useful to parse
the string into cell values.
Cheers

Gabriel

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to read the entire results table as a string

Stein Rørvik
In reply to this post by Herbie
Yes, that will work.
I was not aware that String.paste could be used this way.
Thanks!

Stein

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Herbie
Sent: 20. desember 2017 11:39
To: [hidden email]
Subject: Re: How to read the entire results table as a string

Good day Stein,

would

String.copyResults;
str = String.paste;
print(str);

help?

Regards

Herbie



--
Sent from: http://imagej.1557.x6.nabble.com/

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html