LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Activex with Excel / memory increases indefinitely

I have a subroutine which writes a 2 D Array to an excel spreadsheet. In
that routine, I open an excel ref, open the sheet, write the array and close
both references (Worksheet and excel)
It works fine; the only thing is that when Labview gets through every time
it adds about 10 k of memory for Labview.
As I do that every second, after an hour the system is running out of
memory.

What's wrong?
Not to close the excel ref does not help since labview wants a new ref for
each subroutine run.
0 Kudos
Message 1 of 2
(2,409 Views)
Anderegg wrote:

> I have a subroutine which writes a 2 D Array to an excel spreadsheet. In
> that routine, I open an excel ref, open the sheet, write the array and close
> both references (Worksheet and excel)
> It works fine; the only thing is that when Labview gets through every time
> it adds about 10 k of memory for Labview.
> As I do that every second, after an hour the system is running out of
> memory.
>
> What's wrong?
> Not to close the excel ref does not help since labview wants a new ref for
> each subroutine run.

It may be that you are adding to your 2D array every time through the loop.
You can check this out by changing the ActiveX/Excel for a simple write to
spreadsheet. If the mem still builds up it is probably in your code that way.
Kevin K
ent
0 Kudos
Message 2 of 2
(2,409 Views)