How to open second workbook to compare data with Excel Office Script?

Sanja 26 Reputation points
2022-06-03T11:41:30.453+00:00

Hello,

I already use a script to do some jobs in a monthly generated excel file. Unfortunately, I couldn't figure out how to open a second workbook to compare data, something like VBA's Workbooks.Open(). Thanks in advance.

BR

Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nancy Wang 116 Reputation points Microsoft Employee
    2022-06-07T21:03:00.183+00:00

    Hi @Sanja ! PM from the Office Scripts team here - opening a second workbook isn't possible through Office Scripts, but depending on your scenario you might be able to do this with a combination of Office Scripts and Power Automate. As an example, here's a scenario that uses the two technologies to combine data from multiple workbooks into one workbook: https://learn.microsoft.com/en-us/office/dev/scripts/resources/samples/combine-worksheets-into-single-workbook.

    I hope this helps! Please feel free to reach out with any other questions.

    Cheers,
    Nancy

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.