I just started working with ImageJ and have trouble saving information to a text file.
I’m running a threshold where I set the threshold manually. Then I want to save the lower and upper threshold in an text file.
However it does not give an error, but it is also not saving anything into the textfile.

So that "\n" creates a tab instead of a newline? is that the only thing that undoes the newline of each ‘print()’ ?

I ask because I am trying to print elements of different length arrays in distinct rows. That is, I want rows of different lengths to be printed to a .txt file. Using ‘print()’ is problematic because if I loop through each element of an array, each print() instance will create a new line.

I have tried File.append(), this doesn’t seem to use the tabs to keep elements on the same line.

I guess you have solved your own problem using the “\n” when it doesn’t work as expected.

If you cycle through a single array on one line using the “\n” [no space] and then use an "\n " [with a space] to create a new line and then cycle for the next array. Something like the code below (it needs a bit more imagination, I’m not sure how you’re making the arrays?).

However, when I open the txt files The new lines change depending on the program (NotePad or Word) and the new line metacharacters are not translated. It doesn’t seem like the data can be imported into Excel when I try to separate by the deliminator character (tab). I would like to come to some format where I can distinguish separate lines for working with the data.