In my for ... of loop, there is an array which I would like to put each data in the excel cell. As I know "\t" should mean the "Tab", so that every data in the for...of loop should go to the next cell. However, the whole data are still stay in the same cell. Could someone point out where is the issue of the code?
return new Promise((resolve, reject) => {
const getGroupFromApi = async () => {
try {
for (const group of response.data.groups) {
const getData = group.name;
const cellText = document.createTextNode(getData + "\t");
cell.appendChild(cellText);
}
resolve(cell);
} catch (err) {
reject(cell);
}
}
}