Deo.Winter
New Member
- Joined
- Jun 6, 2011
- Messages
- 3
Can one access a spreadsheet created by an internet export, from within an existing Excel spreadsheet, without first "touching" the newly created spreadsheet?
By way of explanation:
I am running Excel 2007 under Windows 7. I have an Excel spreadsheet in which I collect weather data as a continuum, "WindData.xlsm". Every morning I access an Internet site using Internet Explorer, and from the Right-Mouse click I select "Export to Microsoft Excel ". This creates a "Book1" Workbook with the data (in a range named "ExternalData_1") in Sheet1!$A$1:$Y$18 . I later discard this file.
I can click on Book1, select the data, click on WindData.xlsm and implement macros to process the data. I have been unable to get a macro (from WindData.xlsm) to access Book1 without me first activating Book1 by clicking on it (and the selecting the data). It seems as if each Internet created Workbook runs as it's own (and only) copy of the Excel application. For each Internet created Workbook, a macro run from within the Workbook yields an Application.Workbooks.Count of 1 (irrespective of the number of open Internet creations). If I open n (say 5) files "normally" (in addition to any number of open Internet creations), and interrogate, Application.Workbooks.Count will equal n (say 5) (irrespective of the number of open Internet creations). The regular spreadsheets all know about each other, but the internet creations seem to only know about themselves, and seem to be knowable only to themselves. It thus seems as if by normally opening WindData.xlsm and any other Excel files I choose, the same instance of Excel is being used and the opened workbooks added to the Workbooks collection, but that a different, unique, instance of Excel is used for each and every Internet download.
Thus: Can one access an "Internet" creation by macro from within a "standard" open spreadsheet, without first physically accessing the Internet creation by selecting it and selecting the data or saving the file?
Any ideas?
By way of explanation:
I am running Excel 2007 under Windows 7. I have an Excel spreadsheet in which I collect weather data as a continuum, "WindData.xlsm". Every morning I access an Internet site using Internet Explorer, and from the Right-Mouse click I select "Export to Microsoft Excel ". This creates a "Book1" Workbook with the data (in a range named "ExternalData_1") in Sheet1!$A$1:$Y$18 . I later discard this file.
I can click on Book1, select the data, click on WindData.xlsm and implement macros to process the data. I have been unable to get a macro (from WindData.xlsm) to access Book1 without me first activating Book1 by clicking on it (and the selecting the data). It seems as if each Internet created Workbook runs as it's own (and only) copy of the Excel application. For each Internet created Workbook, a macro run from within the Workbook yields an Application.Workbooks.Count of 1 (irrespective of the number of open Internet creations). If I open n (say 5) files "normally" (in addition to any number of open Internet creations), and interrogate, Application.Workbooks.Count will equal n (say 5) (irrespective of the number of open Internet creations). The regular spreadsheets all know about each other, but the internet creations seem to only know about themselves, and seem to be knowable only to themselves. It thus seems as if by normally opening WindData.xlsm and any other Excel files I choose, the same instance of Excel is being used and the opened workbooks added to the Workbooks collection, but that a different, unique, instance of Excel is used for each and every Internet download.
Thus: Can one access an "Internet" creation by macro from within a "standard" open spreadsheet, without first physically accessing the Internet creation by selecting it and selecting the data or saving the file?
Any ideas?