printToString gets the output string as argument and can be called recursive with the same output string to format ranges.