I am having a problem in setting the auto-width. I want to fit all the text in a single cell where all values can be viewed without further clicks. My exported CSV currently looks like this :
And the following is what I want to achieve:
What I've tried out so far is, convert this array of data (stringified)
[
["Play Date","Round","Result Virtual","Result Data"],
["=\"2020-03-04 00:48:00\"","16","\"[LEFT, LINE3, EVEN]\"","\"[LEFT, LINE3, EVEN]\""],
["=\"2020-03-04 00:51:00\"","17","\"[LEFT, LINE4, ODD]\"","\"[LEFT, LINE4, ODD]\""],
["=\"2020-03-04 00:54:00\"","18","\"[LEFT, LINE3, EVEN]\"","\"[LEFT, LINE3, EVEN]\""],
["=\"2020-03-04 00:57:00\"","19","\"[RIGHT, LINE4, EVEN]\"","\"[RIGHT, LINE4, EVEN]\""]
]
into CSV format and then download:
data.forEach(rowItem => {
rowItem.forEach(colItem => {
csvString += `${colItem},`
})
csvString += '\r\n'
})
csvString = 'data:application/csv,' + encodeURIComponent(csvString)
var x = document.createElement('A')
x.setAttribute('href', csvString)
x.setAttribute('download', `${new Date()}.csv`)
document.body.appendChild(x)
x.click()

