0

I would like to run the script "xGen_FilterRemove" from my "Generic Macros.gs" file in my "Test" Script located in "Macro.gs" as per below, but am know sure how to correctly reference it?

function Test() {
 
 var aCurrentBook = SpreadsheetApp.getActive();
 'Generic Macros.gs'.xGen_FilterRemove()
 }
 };

enter image description here

asked May 30, 2022 at 4:26
0

1 Answer 1

2

Just run it like this

function Test() {
 var aCurrentBook = SpreadsheetApp.getActive();
 xGen_FilterRemove()
}

All of the functions in a project are accessible universally no matter what file they are in. That's why all functions must have a unique name. The files are provided to make it easier to organize them. You can have as many functions in a file as you wish

answered May 30, 2022 at 4:42
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.