How to connect to OPEN workbook in another instance of Excel SAP Issue

Radoslaw Poprawski

Active Member
Joined
Jun 19, 2021
Messages
398
Office Version
  1. 365
Platform
  1. Windows
I tried to follow up with the topic here: How to connect to OPEN workbook in another instance of Excel
And yes I also posted this question on stack:

But I ran into a problem, Iam not able grab the new instance name or path
However I know I have open excel window in another instance (opened from SAP system) and when I open VBA editor in that SAP generated excel file and I type: ? Thisworkbook.Path in immidiate window I get nothing, no path is given and thus this solutions does not get the instance path.
What can I do make it work ?
My issue is that this: Set xlApp = GetObject("C:\Tmp\TestData2.xlsx") is not grabbing the workbook name (including This.workbook.name or activeworkbook.name)
Any idea how else I can work in instance 1 vba code with workbook in instance 2?
I only want to save it nothing more, im using SAveas option, or at least I try. Did any1 had similiar issue?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
It sounds as if excel instances generated by SAP do not get registered in the Running Object Table.
What is the name of the workbook that is generated by the SAP software? And is the window of the generated excel workbook a child of the SAP application ?
 
Upvote 0
Hi,
thanks for repling.
the name is simple "Book1" and the "1" usualy is a different number.
I did not manage to understand when the number changes.
the Excel file is a result from a custom created T-code to which I do not know how it programmed.
However i think that yes, the file is SAP chiald since it came out of SAP NOT using normal data extraction path.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,021
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top