Unanswered: How to access the appropriate workbook in excel
i have been exporting formatted data into excel using the excel application object... (works like a charm, btw)
however, i still have troubles getting to the appropriate template:
i am currently copying a particular (colorful) template to a user's pc.
i open this template via shelling.
i have no problem locating the template as long as it is in the active excel application, however (unfortunately, because the first opened instance of excel is the active appli..)
more often than not, it's in another instance of excel...
therefore, i need to find a way to locate that active excel application
(but please let's not get into API if there's a simpler solution, is there?)
However, there is a way of avoiding the problem in the first place
Check out the code here: http://www.dbforums.com/showpost.php...81&postcount=4
There is a procedure (ExportData_Sheet_Intermed_B) that specifically opens a template file and manipulates it. The key is that the file is opened via automation (i.e. by the active excel instance) rather than using the shell command.