Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in updating the Powerpoint Embedded Chart with Excel figur Vinod Charts and Charting in Excel 0 May 4th 07 02:19 PM
Managing Excel from VB^ Uwe Excel Programming 2 April 15th 06 07:43 PM
Problem opening Excel file 1 time with embedded Word objects [email protected] Excel Programming 0 August 3rd 05 08:47 PM
Excel VBA: Problem with copying an embedded chart from one worksheet to another Flystar[_13_] Excel Programming 2 May 21st 04 01:13 AM
Managing Addins in Excel Lorin Excel Programming 1 July 26th 03 02:23 PM


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"