Call up several books and clean their contents

Viero
New Member

Hello,
I am making a code to create a function that at the moment of pressing a button, exports the information of several books to a PDF and once finished, it deletes the data of some specific cells, however to make the call of those books I need to call it via URL, but it won’t let me call them, just doing them 1 by 1 and that’s very tedious … I don’t know if I’ll have to call them via URL
I leave the code that I am using where the “openBy URL ()” is where I must place the addresses of several books …
function clear_sheeds(){

var Activ = SpreadsheetApp.openByUrl(“Captura4 - Google Sheets”);

var uf = Activ.getLastRow();

var cel = Activ.getRange(“C11:C”).clearContent();

var cel2 = Activ.getRange(“F11:F”).clearContent();

}

0 2 108
2 REPLIES 2

This appears to be a question about a Google App Script, and has nothing to do with Appsheet, correct?

I’ll try to answer your question, but just know that this is the Appsheet community and typically you won’t find much support for GAS here.

You probably should hold an array of all of the URLs, then run a loop over that array, calling your posted function on every iteration, passing each individual URL.

Viero
New Member

Thank you very much for your support!
I’ll try…

Top Labels in this Space