I have followed the following tutorial : https://developers.google.com/apps-script/storing_data_spreadsheets#writing-1.
First, I have a source spreadsheet with the following columns ( First Name, Last Name and Department) and associated data (see a screenshot of the source file here : https://developers.google.com/apps-script/images/reading_spreadsheet_data_image1.jpg).
Then, I dynamically create one Sheet per department name (see tutorial code) : every sheet contains the information about employees in that department. (see tutorial screenshot).
I have customized this tutorial to create, dynamically, one Spreadsheet per departement instead of one Sheet per department.
When each child Spreadsheet is modified, i want to launch an "On Edit" trigger. This "On Edit" trigger will re-generated the source spreadsheet with all child spreasheets data.
I have tested this functionnality but it seems that i can't program the creation of an "OnEdit" trigger on a distant spreadsheet (execution validation issue). It seems that only a manual creation (of the "On Edit" trigger) is possible.
Is it possible to create, dynamically with Google Script, a trigger on a distant spreadsheet ?
Best Regards