'Splitting out product details in cell
Solution 1:[1]
Any cell that contains multiple lines of text can be split into an array of text. For example G112 contains 7 lines.
function test() {
try {
var sh = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
var value = sh.getRange("G112").getValue();
console.log(value.split('\n'));
}
catch(err) {
console.log(err);
}
}
Would produce an array ['Size Small','Item Width 1,400mm',...]?
Since each cell has a different number of lines you'll have to pack some rows to make a symmetrical 2 dimensional array and then put if back somewhere.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | TheWizEd |

