Jump to content

Get excel workbook and sheet name


ahha
 Share

Recommended Posts

Subz,

Okay here's the result on Win 10 x64 Office 2016.   However Office 2016 starts 5 instances all maximized.

image.thumb.png.169bdc37cda84cb927869dc6399b77a3.png

Okay here's what I found at: https://answers.microsoft.com/en-us/msoffice/forum/msoffice_excel-mso_win10-mso_2016/opening-multiple-spreadsheets-in-one-incident-of/7ab97254-404a-4c71-b96a-ffd663387cb4

"Excel 2016 when opened opens only one instance and cannot open multiple spreadsheet within the same instance of Excel. However, let us know if you are talking about the ability in Excel 2016 to open multiple spreadsheets in the same Excel 2016 instance? If yes, then this feature is not available in Excel 2016 and was discontinued since Excel 2013."

So if Excel 2007 opens 2 instances for the 5 books, and Excel 2016 even under Autoit control opens 5 instances how do I check which objects go with $oExcel1 = _Excel_Open() for example.  Is there a way to compare objects in the above array to see if there are 5 different objects?

*Edit* okay found this here: https://support.microsoft.com/en-us/help/3165211/how-to-force-excel-to-open-in-a-new-instance-by-default

" In Microsoft Excel 2013 and later versions, when you open multiple spreadsheets, they all open in the same instance of Excel. However, in some situations, such as when you're working with large Excel spreadsheets, you may want to open each one in a new instance. This article explains how to do that by configuring a registry key. " (Emphasis added.)

So now I'm really confused.  Do $oExcel1 = _Excel_Open()   and $oExcel2 = _Excel_Open(Default, Default, Default, Default, True)    ;open second instance

open the same instance or a new one?

So it looks like I'm going to have to rethink how I handle this situation as not everyone has moved to 2016 and I haven't yet got a hold of Office 2019 to see what it does.

Edited by ahha
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...