writeTXTFile returning thr word "null"

We have a method with the following code which is running fine:

var fileWritten = plugins.file.writeTXTFile( fileAbsoluteFile , ds.getAsText("\t", "\n", "", true) );

The only problem is that if there are any null values in the dataset what is getting written to the file is the word “null” – but we just want a blank value.

Is there a way to turn-off the writing of the word “null”?

An empty string is something else than null (in most databases), if you don’t want the null values do the getAsText your selfs (loop over all columns/rows and append to a string)