Forum Discussion
Office Scripts - Working With Multiple Worksheets
- Jul 27, 2021
I figured this out... all you have to do is declare a different variable name for the next workbook. In the first block of code, which is in my original message, the variable is called "selectedsheet" and the statement looks like this: "let selectedSheet = workbook.getWorksheet("Issues");"
What I did for the next worksheet is this: "let sheetproblems = workbook.getWorksheet("problems")" and followed up with the rest of the items.The way I figured this out was to open a new Excel sheet and actually record a new script by bolding the text in cells on two separate worksheets. Then I just looked at the code that was automatically generated to see how it handled switching worksheets.
I hope someone finds this information useful in the future.
Is it possible to run multiple Office Scripts in parallel on the same workbook?
We need to reduce the execution time of the Power Automate flow to improve agent response times.
How can we avoid save conflict errors when running multiple Office Scripts simultaneously on the same workbook?