Skip to content

Instantly share code, notes, and snippets.

@squigglezworth
Last active September 5, 2022 11:16
Show Gist options
  • Save squigglezworth/aeb199059b6e24b9814eb2e43898c723 to your computer and use it in GitHub Desktop.
Save squigglezworth/aeb199059b6e24b9814eb2e43898c723 to your computer and use it in GitHub Desktop.
Google Apps Script for retrieving EVE Online typeIDs automatically
function updateTypes() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Internal: typeids_full");
var response = UrlFetchApp.fetch("https://www.fuzzwork.co.uk/dump/latest/invTypes-nodescription.csv");
var resource = {
requests: [
{
pasteData: {
data: response.getBlob().getDataAsString(),
coordinate: {sheetId: sheet.getSheetId()},
delimiter: ",",
}
}
]
};
// Add the Sheets service to your Apps Script project
Sheets.Spreadsheets.batchUpdate(resource, ss.getId());
}
@squigglezworth
Copy link
Author

  • Add this to your sheets' Apps Script
  • Add the Google Sheets API Service to your Apps Script
  • Create a sheet called typeids_full (or change line 3)
  • Call the function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment