- Javascript & Google Apps Script used as a backend to get data from a Google Sheets spreadsheet then convert to a JSON object array.
- Note: to open web links in a new window use: ctrl+click on link
- All code is written in Google Apps Script that is accessed from the menu of a Google Sheets spreadsheet
data.xls
shows the random technical data I used in a spreadsheet but any data could be used
- The Google Sheets document id has to be added as the const id in
convert_xls_json.js
- Copy JS code into a Google Sheets spreadsheet Google Apps Script and run
- N/A
convert_xls_json.js
forEach method to add the xls header data to a userData array
userData.forEach((element, ind) => {
const temp = {
row: ind + 2,
};
headers.forEach((header, index) => {
temp[header.toLowerCase()] = element[index];
});
userArray.push(temp);
});
- Converting xls to JSON data
- Status: Working
- To-Do: Nothing
- This project is licensed under the terms of the MIT license.
- Repo created by ABateman, email: [email protected]