Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Re: Excel Automation -- SOLVED! (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Failed assertion in 5.5
Next thread: Grow Icon vs. Scroll Arrow


Excel Automation   -   mark.lubratt indeq.com
  Re: Excel Automation -- SOLVED!   -   mark.lubratt indeq.com
    Re: Excel Automation -- SOLVED!   -   Mark Lubratt
    Re: Excel Automation -- SOLVED!   -   Mark Lubratt

Re: Excel Automation -- SOLVED!
Date: 28.02.04 21:50 (Sat, 28 Feb 2004 15:50:13 -0500 (EST))
From: mark.lubratt indeq.com
> I'm trying to output some data I collect from a database into an excel
> spreadsheet. I've followed the excelReport example religiously and on my
> platform (Windows XP, Office 2000, Win IDE 5.2.4), MS Excel starts up in a
> weird state. Only the Excel menu bar appears. The workbooks aren't
> visible, the background of the Excel main window isn't visible. If I
> switch to the main Excel application, any workbook I start up isn't
> visible.
>
> I can close these invisible windows and save them to a file. When I
> restart Excel, I'm able to load them and view them normally.
>

I solved the problem!

Darryl Snover posted a similar problem over a year ago:
<http://www.realsoftware.com/listarchives/realbasic-nug/2003-02/msg00140.html>

It seems that RB's reference counting with the Excel Office plugin is
broken (Word seems to work and I haven't tried PowerPoint). Thus, when
the sample program's subroutine goes out of scope, the objects excel, book
and sheet aren't deallocated from memory. Darryl tried just using:

excel = nil

with little success. I nil'ed all three:

sheet = nil
book = nil
excel = nil

and the sample program works like a charm.

Should I report this as a bug??

Regards!
Mark

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Excel Automation -- SOLVED!
Date: 29.02.04 03:29 (Sat, 28 Feb 2004 20:29:09 -0600)
From: Mark Lubratt
Again, I think I spoke too soon. (Windows OS, Windows IDE 5.2.4)

1. Quit the Excel application after sending it data, but don't quit
your application.
2. Check the task manager and there is still an Excel process running.
3. Now, if you send data to Excel again from your application, the
Excel application goes into a weird display state.

If on the other hand:

3. End the Excel process from the Task Manager.
4. Send data to Excel again from your application, the Excel
application still goes into a weird display state.

If you quit Excel before your application, you must check the Task
Manager and make sure Excel isn't still running. If so, end it. Then
you must restart your application.

It seems that there is a connection from the application to Excel that
remains open after the ExcelApplication object should be destroyed.
This connection must be "reset" if Excel quits while the application is
running.

I haven't confirmed any of this on Word.

Has this been fixed on 5.5?

Mark

On Feb 28, 2004, at 2:50 PM, <email address removed> wrote:

>> I'm trying to output some data I collect from a database into an excel
>> spreadsheet. I've followed the excelReport example religiously and
>> on my
>> platform (Windows XP, Office 2000, Win IDE 5.2.4), MS Excel starts up
>> in a
>> weird state. Only the Excel menu bar appears. The workbooks aren't
>> visible, the background of the Excel main window isn't visible. If I
>> switch to the main Excel application, any workbook I start up isn't
>> visible.
>>
>> I can close these invisible windows and save them to a file. When I
>> restart Excel, I'm able to load them and view them normally.
>>
> I solved the problem!
>
> Darryl Snover posted a similar problem over a year ago:
> <http://www.realsoftware.com/listarchives/realbasic-nug/2003-02/
> msg00140.html>
> It seems that RB's reference counting with the Excel Office plugin is
> broken (Word seems to work and I haven't tried PowerPoint). Thus, when
> the sample program's subroutine goes out of scope, the objects excel,
> book
> and sheet aren't deallocated from memory. Darryl tried just using:
>
> excel = nil
>
> with little success. I nil'ed all three:
>
> sheet = nil
> book = nil
> excel = nil
>
> and the sample program works like a charm.
>
> Should I report this as a bug??
>
> Regards!
> Mark
>
> - - -
> Unsubscribe or switch delivery mode:
> <http://support.realsoftware.com/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Excel Automation -- SOLVED!
Date: 29.02.04 08:16 (Sun, 29 Feb 2004 01:16:21 -0600)
From: Mark Lubratt
I'm sorry about all the wasted bandwidth. This problem appears to be
fixed in 5.5 (Nice Job RS!!). Yet another reason to try to get the
upgrade to work.

Mark

On Feb 28, 2004, at 8:29 PM, Mark Lubratt wrote:

> Again, I think I spoke too soon. (Windows OS, Windows IDE 5.2.4)
>
> 1. Quit the Excel application after sending it data, but don't quit
> your application.
> 2. Check the task manager and there is still an Excel process running.
> 3. Now, if you send data to Excel again from your application, the
> Excel application goes into a weird display state.
>
> If on the other hand:
>
> 3. End the Excel process from the Task Manager.
> 4. Send data to Excel again from your application, the Excel
> application still goes into a weird display state.
>
> If you quit Excel before your application, you must check the Task
> Manager and make sure Excel isn't still running. If so, end it. Then
> you must restart your application.
>
> It seems that there is a connection from the application to Excel that
> remains open after the ExcelApplication object should be destroyed.
> This connection must be "reset" if Excel quits while the application
> is running.
>
> I haven't confirmed any of this on Word.
>
> Has this been fixed on 5.5?
>
> Mark
>
> On Feb 28, 2004, at 2:50 PM, <email address removed> wrote:
>
>>> I'm trying to output some data I collect from a database into an
>>> excel
>>> spreadsheet. I've followed the excelReport example religiously and
>>> on my
>>> platform (Windows XP, Office 2000, Win IDE 5.2.4), MS Excel starts
>>> up in a
>>> weird state. Only the Excel menu bar appears. The workbooks aren't
>>> visible, the background of the Excel main window isn't visible. If I
>>> switch to the main Excel application, any workbook I start up isn't
>>> visible.
>>>
>>> I can close these invisible windows and save them to a file. When I
>>> restart Excel, I'm able to load them and view them normally.
>>>
>> I solved the problem!
>>
>> Darryl Snover posted a similar problem over a year ago:
>> <http://www.realsoftware.com/listarchives/realbasic-nug/2003-02/
>> msg00140.html>
>>
>> It seems that RB's reference counting with the Excel Office plugin is
>> broken (Word seems to work and I haven't tried PowerPoint). Thus,
>> when
>> the sample program's subroutine goes out of scope, the objects excel,
>> book
>> and sheet aren't deallocated from memory. Darryl tried just using:
>>
>> excel = nil
>>
>> with little success. I nil'ed all three:
>>
>> sheet = nil
>> book = nil
>> excel = nil
>>
>> and the sample program works like a charm.
>>
>> Should I report this as a bug??
>>
>> Regards!
>> Mark
>>
>> - - -
>> Unsubscribe or switch delivery mode:
>> <http://support.realsoftware.com/listmanager/>
>>
>> Search the archives of this list here:
>> <http://support.realsoftware.com/listarchives/lists.html>
>>
> - - -
> Unsubscribe or switch delivery mode:
> <http://support.realsoftware.com/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>