A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
I would suggest creating a new thread on the Office Development channel, which is specifically designed to handle Office script questions. This way, you can get more specialized assistance for your query.
Office Development - Microsoft Q&A
Thank you for your understanding.