Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with managing excel embedded with IFRAME
Hello
I have a problem with embeddeing excel in iframe: <IFRAME src="1.xls" and this works fine. Then on client side in browser i try to do some action with that workbookfrom javascript. The problem is, that when i get the excel object and get ActiveWorkbook - i have my workbook, BUT ONLY FOR FIRST OPERATION!! Example: function setCellContent() { var objExcel = GetObject("","Excel.Application"); // Here is ok, alert says '1.xls' alert("Window: " + objExcel.ActiveWorkbook.Name); // But here it is no ok! Excel changed Active workbook // for some other by itself... alert("Window: " + objExcel.ActiveWorkbook.Name); } OK, my workbook is still in the IFRAME, i can see it, so i will try to get it this way: I'm looking for my '1.xls' : alert("Window: " + objExcel.ActiveWindow.Caption); objExcel.ActiveWindow.ActivateNext(); alert("Window: " + objExcel.ActiveWindow.Caption); objExcel.ActiveWindow.ActivateNext(); alert("Window: " + objExcel.ActiveWindow.Caption); objExcel.ActiveWindow.ActivateNext(); ..... There isn't !! It is imposible to set my workbook active, so i can't do anything with it! And i still can see it by doing this: for (var i=1;i<=objExcel.Workbooks.Count;i++) { if (objExcel.Workbooks(i).Name == "1.xls") { alert("There it is: " + i + " " + objExcel.Workbooks(i).Name); } } What is going on, please help. Best reagards, Michal Dabrowski |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with managing excel embedded with IFRAME
That's me again.
Can anyone tell me anything abot my problem please? What I can add is that Activate() method doesn't work neither. Example: for (var i=1;i<=objExcel.Workbooks.Count;i++) { if (objExcel.Workbooks(i).Name == "1.xls") { alert("There it is: " + i + " " + objExcel.Workbooks(i).Name); objExcel.Workbooks(i).Activate(); } } alert(objExcel.ActiveWorkbook.Name); // doesn't get '1.xls' , // but somthing else // or nothing Thanks for any help in advance Michal Dabrowski |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem in updating the Powerpoint Embedded Chart with Excel figur | Charts and Charting in Excel | |||
Managing Excel from VB^ | Excel Programming | |||
Problem opening Excel file 1 time with embedded Word objects | Excel Programming | |||
Excel VBA: Problem with copying an embedded chart from one worksheet to another | Excel Programming | |||
Managing Addins in Excel | Excel Programming |