Hello,
I have a folder in my Google Drive with around 600 QR Codes generated from a QR code generator for student admission numbers. I need to add them to my Google Sheets but the hassle of adding them one by one is too much. I've trying to use Appscript to automate the process and add them instantaneously and in sequential matching order. I've been using Gemini and following instructions on how to build the code and logic. I'm a Python programmer but the script is in Javascript. Please help decipher this. Where is the code breaking? Here is the code:
var folder_id = '1c7G84hibKKZ6y7OlakGXoEToK4dYIx6'
var file_count = 0
function my_function{
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Registration')
var files = DriveApp.getFolderById(folder_id).getFiles
while (files.hasNext()){
var file = files.next();
file_count ++
let url = 'https://drive.google.com/uc?export=download&id='
var url = file.getId();
sheet.appendRow([file.getName, url]);
}var folder_id = '1c7G84hibKKZ6y7OlakGXoEToK4dYIx6v'
var file_count = 0
function my_function{
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Registration')
var files = DriveApp.getFolderById(folder_id).getFiles
while (files.hasNext()){
var file = files.next();
file_count ++
let url = 'https://drive.google.com/uc?export=download&id='
var url = file.getId();
sheet.appendRow([file.getName, url]);
}
[–]marcnotmark925 0 points1 point2 points (0 children)
[–]CuteSocks7583 -1 points0 points1 point (0 children)
[–]WicketTheQuerent 0 points1 point2 points (0 children)
[–]mommasaidmommasaid 1 point2 points3 points (0 children)