CURRENTLY
I have a .txt
file which contains some data:
Z Financial
Company name of the tax subject :
I have a google script file to get the data from the .txt
and convert into JSON format to paste into Google Sheet (like a manual import in Google Sheets would do)
Snippet:
let files = folder.getFiles();
var file = files.next();
var raw = file.getBlob().getDataAsString();
console.log(raw);
var data = Utilities.parseCsv(raw)
ISSUE
console.log(raw)
is returning:
data
variable the returns as array of length 1 with value: ��
and nothing else.
From the .txt
snippet above, I would (roughly) expect an array of length = 3, with lines as follows:
- Z Financial
- Company name of the tax subject :
NOTES
QUESTION
What am I missing to get the txt parsed as a CSV?