Writing array to Excel with ActiveX

Common question I suppose, but I'm still having issues despite reading several posts about the issue.
Problem is I'm trying to write a 1D array of data to 1 column in an excel document. However, unless I add an artificial column (of blank values or some other bogus #), ActiveX only writes the 1st value of my array to the column.
Look at the attached. In Picture 1 I add an articial column and everything writes fine. In Picture 2 I don't add this column and only the 1st value of the array gets written in each row.
Suggestions?
Thank you.
Solved!
Go to Solution.
Attachments:
images.jpg ‏233 KB

I haven't done much with Excel and LabVIEW by way of ActiveX.  Creating a small VI and duplicating what you show in your screenshot, I see the same behavior.
I believe that Excel interprets a 1-D array as something that runs horizontally.  So a 1-D array consists of a single row of cells and N number of columns.
(Actually LabVIEW interprets a 1-D array like this as well, but it allows you to show an array onscreen either vertically or horizontally.)
Converting to a 2-D array and transposing is what you need to do to have that 1-D array be treated as a single column of cells.
Note that you don't have to use build array and append an empty array to it.  You can just use build array as is and it will turn a 1-D array into a 2-D array.
Attachments:
Example_VI.png ‏22 KB

Similar Messages

  • LabVIEW and Excel with ActiveX

    Hi,
    I am using LabVIEW6.1 and I am trying to format data for printout that I have stored in Excel using activeX.
    I have three questions that I included the recorded Excel macro for:
    1) How do I set the horizontal and vertical page breaks using ActiveX?
    Excel macro:
    Set ActiveSheet.VPageBreaks(1).Location = Range("F1")
    Set ActiveSheet.HPageBreaks(1).Location = Range("A41")
    2) How do I set the print area using activeX?
    Excel macro:
    ActiveSheet.PageSetup.PrintArea = "$A$1:$J$57"
    3) How do I left, right center justify the content of cell using ActiveX.
    Excel macro:
    Range("B3:B8").Select
    With Selection
    .HorizontalAlignment = xlCenter
    End With
    Thanks in advance for your time.
    KMA

    You cannot index the VPageBreaks if you are creating a new worksheet. You would use the index to change an existing VPageBreak. To create a new VPageBreak, replace the Item method with the Add method. Wire the range ref directly into the Before input. I fixed your VI and attached it.
    To get the value of the xlCenter constant, open the Visual Basic editor that comes with Excel and use the Object Browser (F2). Type xlcenter into the search window and click the binoculars. The value is displayed at the bottom of the window. You will use that trick a lot when looking for the Excel constants for LabVIEW.
    Michael
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector
    Attachments:
    Excel_Page_Break_mod.vi ‏67 KB

  • Help with quitting Excel with activex (save-dialog)

    Hello.
    I have following question.
    I have a VI that writes data from measurement devices into an excel file. Afterwards I want to change the order of the entries with the help of activex.
    All that works fine, but when I quit excel the save-dialolg always pops up. I searched this board for possible solutions and experimented quite a bit but I still get one dialog at the end.
    Well, now at least it is only one and not multiple ones. The loop in my the implementation for the data manipulation might be the cause, but if it is it, i don't know why or how to solve it. But maybe it is something different. Anyway, I cannot find the reason.
    Some help would be really appreciated .
    Thank you very much in advance.
    Regards
    CD
    Solved!
    Go to Solution.
    Attachments:
    labview excel.JPG ‏136 KB

    OK. In the attachment is a picture of the modifications.
    Now I have to two problems.
    First, after running it in highlight modus, I now know the dialog pops up at the _Workbook.close invoke node. Despite setting true to SaveChanges.
    Second, I now get an error code -2147352565 - unknown error at invalid index. and nothing gets saved.
    Attachments:
    labview excel changesI.JPG ‏79 KB

  • Closing Excel with ActiveX causes problem

    Hallo,
    I am having a problem using ActiveX and Excel. I
    am using NT 4.0, Service Pack 3, Excel 97, Service
    Release SR1 and LabVIEW 5.1.
    My LV application opens an Excel worksheet,
    operates on the sheet and then closes it by using
    ActiveX. Everything works fine until I try to
    start Excel from the desktop after running my LV
    application. Then I get an "Exception access
    violation" generated by excel.exe. It seems like
    my application does not manage to end the
    excel.exe process which leads to the "violation
    error" next time Excel is to be opened. To quit
    Excel I call the "quit" method in
    Excel_Application and then call the "Automation
    Close".
    Anyone knows how to solve this?
    \Helena Dimitriou
    Sent via Deja.com
    http://www.deja.com/
    Share what you know. Learn what you don't.

    Greg, this is the problem: Granted that Excel closes properly when users try to close all opened refnums, when this VI is used as subvi (loop) "Excel.exe" does not close (every instance opened). It stays in the Task Manager until the program that uses this subVI ends. This is not good because "Excel.exe" uses a large memory.Just think what will happen if I try to use this "Excel" subVI a couple of hundred times in an application VI. It leaves at least 6000kb of memory for every instance multiply it by a couple of hundreds, then your PC crashes.
    Another, open only one instance, the "Excel.exe" process remain in the Task Manager.
    What can you say? You haven't tried?
    Try this: create a vi which will open the Excel Application (wire the "open new instance
    " terminal to TRUE), open an existing Excel workbook, add sheet, write numbers 1 to 255 from A1 to A255 and B1 to B255 to the added and close the ranges where the numbers are written, close the added sheet, close the opened workbook and close the Excel application. Then use this vi in a loop that iterates 500 times so that 500 sheets (plus three as default to Excel) will be added to the opened workbook. Before running the VI with the loop, open your Task Manager>>Processes. Run the VI and monitor how many "Excel.exe" while the loop is running and the memory usage it consumes. And take note of the "Excel.exe" which will remain in the Task Manager after the vi with loops ends. Then e-mail me ([email protected] OR [email protected]) of things that went wrong and how to solve the problems that causes for things to go wrong.
    Of course you can also send your VI.
    This my main problem.

  • Handling Popups in Excel with ActiveX

    I'm having a problem similar to the problem referenced in this post:
    https://forums.ni.com/t5/LabVIEW/Handling-popups-of-Excel-while-editing-it-via-Active-X-Control/td-p...
    The difference being...
    My company has an Excel "database" that stores all of our product information. When starting my application I read from this database using ActiveX. Recently this Excel sheet was updated to include new capabilities by someone else within my company.
    Now, when opening this particular worksheet, I get this message:
    It doesn't come to the front of the screen, and unless the user realizes that it is coming the LabVIEW program seems to hangup, causing the user to close the LabVIEW program, because they don't realize that LabVIEW is waiting on Excel, which is waiting on the user to make a selection on this popup.
    In the post I referenced above, they get around this by using a Property Node with the "Display Alerts"  property set to false. This works for hiding errors but doesn't seem to work for this instance. 
    Is there a way, through ActiveX, to "click" the "Don't Update" button without the user having to do this.
    OR
    Worst case scenario, is there a way to bring this popup to the front to alert the user that Excel needs input?
    Thanks
    Solved!
    Go to Solution.

    If anyone stumbles upon this page looking for a solution, here is how I ended up solving the issue:
    http://support.microsoft.com/KB/826921

  • Can't open excel file after saving and closing excel with activex

    I'm using activex to write and save excel files in LabVIEW. My application opens excel (not visible)writes a file, saves it, and then closes both the file and excel. When I try to open the file Excel opens but the file is not displayed, I see the excel header and footer but the file itself does not display. My application is still running at this point. Any suggestions?

    It is critical when using ActiveX with Excel that ALL refnums be properly closed when they are no longer used. Just a single refnum left open will cause the exact situation that you describe. Typically, but not required, the refnums will be closed in the reverse order in which they were created. Here is a good sequence:
    Open Application ref
    Property Workbooks ref
    Open Workbook ref
    Close Workbooks ref
    Select Sheet ref
    Select Range ref
    Write Value2 to Range
    Close Range ref
    Close Sheet ref
    Save Workbook
    Close Workbook ref
    Close Application ref
    When you have properly closed all refnums, the problem will disappear.
    Michael Munroe
    Certified LabVIEW Developer
    www.abcdef.biz
    Michael Munroe, ABCDEF
    Certified LabVIEW Developer, MCP
    Find and fix bad VI Properties with Property Inspector

  • Export to excel with javascript/vbscript or with plsql(html table)

    i have searched for a way to export data from OracleXe to excel without losing formatting .
    So far i have found 2 possible relatively easy ways that i am still researching
    (i do not include the ask tom sylk format way of exporting )
    1 to export the query to a html table, while using stylesheets for formatting
    (using microsoft specific styles)
    2. use of javascript/vbscript to fill an array and write this array to excel with use
    of visual basic for applications in excel.This also provides charting capabilities.
    I am still researching this two ways, and have
    encountered a few obstacles (help would be appreciated)
    1 the first way:
    a. create a button " export to excel"
    b. create the following pl/sql procedure:
    owa_util.mime_header('application/vnd.ms-excel');
    owa_util.http_header_close;
      HTP.PRINT('<html>');
      HTP.PRINT('<head>');
      HTP.PRINT('<meta http-equiv="Content-Type" content="text/html">');
      HTP.PRINT('<title>Title of the HTML File</title>');
      HTP.PRINT('</head>');
      HTP.PRINT('<body TEXT="#000000" BGCOLOR="#FFFFFF">');
      HTP.PRINT('<h1>Heading in the HTML File</h1>');
      HTP.PRINT('<p>Some text in the HTML file.');
      HTP.PRINT('</body>');
      HTP.PRINT('</html>');
    htmldb_application.g_page_text_generated := true;
    htmldb_application.g_unrecoverable_error := true;
    c: run the procedure conditionally based on the button  "export to excel"
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true; is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen.
    To export to excel while retaining data formatting  you have to use microsoft excel
    specific styles(Seedocumentation on the microsoft site)
    2.The second way:
    a create a pl/sql procedure or sql query.
    b use this query to fill a vbscript/javascript array with values
    c write these values to excel with use of vba in excel :
    the obstacle i encountered here was that i dont know how to export the result of a
    query to a visual basic script or javascript array.

    Using approach 1) works fine for me.
    the problem with this way is that using htmldb_application.g_unrecoverable_error := true;
    is not the ideal way, because it
    stops further processing, but if i leave it out, the export doesn't happen. Why is this a problem?
    I created the button to export the excel file on page 1 and created your pl/sql procedure on page 2 using an onload process.
    Works fine.
    Other approaches for exporting to excel are:
    http://www.oracle.com/technology/pub/articles/saternos_broadcast.html
    http://htmldb.oracle.com/pls/otn/f?p=18326:54:5685133631021176591::::P54_ID:1962
    ~Dietmar.

  • How to make an array with ActiveX Excel using Excel_RangeSetValue2?

    Hello,
    I want to make an array on Excel. For that, I'm using two functions : Excel_WorksheetGetRange and Excel_RangeSetValue2.
    I write the array on Excel file but only the first case of the array is copied.
    Here, a part of my program :
    char * DataToWrite = {"A", "B", "C", "D"}
    char cCell[10];
    VARIANT             vCell, Data;
    ExcelObj_Worksheet hWorksheet;
    ExcelObj_Range      hRange;
      CA_VariantSetCString (&vCell,cCell);        //cCell = A1:A4
      Excel_WorksheetGetRange (hWorksheet, NULL, vCell, CA_DEFAULT_VAL, &hRange);
      CA_VariantSetCString (&Data,DataToWrite );
      Excel_RangeSetValue2 (hRange, NULL, Data);
    Here what I obtain when I'm compiling on Excel file :
    A
    A
    A
    A
    Solved!
    Go to Solution.

    You should use other instructions to fill the range of cells:
    strcpy (msg, "A1:A4");
    CA_VariantSetCString (&MyVariant, msg);
    Excel_WorksheetRange (ExcelWorksheetHandle, NULL, MyVariant, CA_DEFAULT_VAL, &ExcelRangeHandle);
    Excel_RangeActivate (ExcelRangeHandle, NULL, NULL);
    // Create a SafeArray from array of data
    CA_VariantSet2DArray (&MyVariant, CAVT_CSTRING, righe, 1, array);
    // Transfer data to Excel range
    Excel_SetProperty (ExcelRangeHandle, NULL, Excel_RangeValue2, CAVT_VARIANT, MyVariant);
    ClearObjHandle (ExcelRangeHandle);
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Writing to Excel using ActiveX improvement?

    Hello,
    At my company we have Labview 2011 basic version with DAQmx. I am writing a program to get temperature data from thermocouples (16), dump it in an array and then store it in Excel using ActiveX. ActiveX seems only to allow writing element by element to my spreadsheet.  When you do acquisition for a long period of time it can be very long! I like using ActiveX because it allows some flexibility such as choosing which sheet and cell I can write my data. Is there a solution to dump the array in one operation using ActiveX?
    I know there is a block call write to spreadsheet which accept 1D and 2D array of data but doesn't allow the same flexibility. I also found report generation but is it made to write data? While waiting for your answer I'll try to dig a little more that blockset.
    Thank you very much and I hope to hear from the community really soon.
    Regards

    I have to appologize. The solution given by Electromecha was good but only outside a loop. Again, I have 16 thermocouples and when I use Electromecha's solution inside a For loop it will copy only the first element. I attached two pictures. One is the program and the second is the result in the spreadsheet. You will notice that inside my loop I added an indicator to read the array before writing it in Excel. The indicator shows the array perfectly with all elements in it. The only way I found to work around this issue is to use indexing and write element by element in Excel. That is way too long!
    For your information, the loop itteration is defined using the array size which is 16 (for 16 thermocouples). The subvi inside the loop allows me to get the column letter from the itteration number. Finally using the size of one full array of results I get the end cell row. 
    If more explanation is required please let me know. 
    Many thanks!
    Attachments:
    Excel.JPG ‏89 KB
    Program.JPG ‏69 KB

  • How to list all currently open Excel files with ActiveX?

    Hello all!
    I would like to program with ActiveX a way to retrieve a list (array of strings) of the filenames of the currently opened Excel files in windows. However, I am fairly new to the ActiveX/Excel business in LV and after hours looking at the "millions" of objects in the property nodes I give up and hope some kind soul here can help me. I couldn't find any information in this forum regarding the same issue, although some were close
    I am using LV 7.1 without the Report Generation Toolkit.
    Thanks!
    /Goran

    Hi KC,
    thanks for your reply. I have in fact been able to find the desired things in the ActiveX properties/methods for Excel in LabView. It took me some looong work going through the functions which I suspected to be the ones. Anyway, I post a little jpeg here of the code if someone ever needs the same functionality. What it does is that it checks how many Excel workbooks are open and controls if each of them matches the searched Excel filename, if one does, it is closed.
    Enjoy
    /Goran
    Attachments:
    List open excel sheets and close open ones.jpg ‏104 KB

  • Read 2 Strings from EXCEL with GOOP or ActiveX?

    Hello,
    i use Labview 5.1 with WIN NT4.0 SP6a and i programm a fuzzy Logic tool for a exam in Computer Science.
    Now i have a problem, and i read something about the GOOP and the EXCEL Toolkit. I download it and try more times to install but i can't link the *.llb in the Function Palette. Is this GOOP and Excel Toolkit only for Labview 6.x ?
    I solve it with ActiveX and Excel, but my very big Problem is, i need to read2 string from the Excel table from the same time, and with ActiveX i don't find any method how can i do that.
    I don't know how can i read 2 Strings from a Excel table, Can i do it with the Excel Toolkit,if yes how, maybe anyone make it or any helpfiles?
    Thanks for your answer in advance ,
    Ender
    Ekinci

    "fuzzylogic" wrote in message
    news:[email protected]..
    > Hello,
    > i use Labview 5.1 with WIN NT4.0 SP6a and i programm a fuzzy Logic
    > tool for a exam in Computer Science.
    > Now i have a problem, and i read something about the GOOP and the
    > EXCEL Toolkit. I download it and try more times to install but i can't
    > link the *.llb in the Function Palette. Is this GOOP and Excel Toolkit
    > only for Labview 6.x ?
    >
    > I solve it with ActiveX and Excel, but my very big Problem is, i need
    > to read2 string from the Excel table from the same time, and with
    > ActiveX i don't find any method how can i do that.
    >
    > I don't know how can i read 2 Strings from a Excel table, Can i do it
    > with the Excel Toolkit,if yes how, m
    aybe anyone make it or any
    > helpfiles?
    I'm pretty sure the excel toolkit is written for 5.1, and don't know why it
    would give you problems. Do you have excel installed? I'm not sure what
    you mean that you cant link the *.llb in function pallette. Have you tried
    opening the llb using '\functions\select a vi' ? As to how to read two
    cells at once, you could read a block of cells including both cells (ie:
    A5..D10) and then pull the data out of the array.

  • Writing arrays in to excel

    Helo..
    I have sampled sine and cosine waves (4096 samples)  and the sampled values are in two different arrays. How can I write those arrays in to two different columns in excel sheet. I am using labview 8.2.
    post the appropriate vi. 
    Thanks in advance. 
    Solved!
    Go to Solution.

    Not to beat a dead horse, but this method will not work, or not work well, in some cases.  For example, you can't use the write to spreadsheet file function if you want to  write to a specific worksheet within a workbook.  Also, the "Write Table to XL" VI is extremely slow for writing large chunks of data - it's writing data cell by cell so that can eat up processor time as the spreadsheet grows. 
    A more efficient way is to use the "Value2" method of the ActiveX Range object.  This way you can write a huge set of data to Excel in a second or two.  I've attached a simple version of a VI I use as an example.
    Greg
    Certifed LabVIEW Developer
    Attachments:
    Write 2D array to Excel.vi ‏12 KB

  • Need help with Excel and ActiveX

    I am new with working with ActiveX, so I need some help regarding writing to a spreadsheet. Here is what I need to do:
    1.The user weighs a product on a scale.
    2.The user presses the weight button control in labview to retrieve the weight via serial port.
    3.The value gets written into a spreadsheet, starting at D2.
    4. User weighs the same product after use to get a new weight.
    5. labview goes through the same process, but this time it gets written to E2.
    6. Differential is calculated (still debating on having the user do this in Excel instead of Labview, since they have to set up a spreadsheet outside of labview for other info not related
    to weight).
    7. User close labview when finished.
    The serial comm and all is fine, but the problem I am having is trying to get a specific cell value written in D2 and then getting another value to be written in E2. For example, initial weight would be D2 and post weight would be E2, and then differential would be F2. For the next product, it would be D3, E3, F3, and so on. What would be the best way to implement this? It looked as if ActiveX would be the only real way to tell Excel where to put the data, but there is still alot I have to learn in where to find and use the proper nodes to complete the process.
    Thanks,
    Jody M.
    The Procter and Gamble Co.
    Certified Labview Developer
    Currently using LV2012.

    Hi z2830than,
    see the attached example. It make following things: open Excel, create new Workbook, ..., write Data to D2, save Workbook and close Excel.
    Hope it helps.
    Mike
    Attachments:
    Excel_open_write_close_Example_LV71.llb ‏234 KB

  • Has somebody got an example for writing datas with ActiveX to MsAccess?

    Hello,
    I'm working with LabView 6i and MsAccess 2000.
    At first, I attempted it with SQL-Toolkit, but my SQL-Software is just for Windows '95.
    I have no experience with ActiveX. I measure with LabView a SineWave and want to write it to MsAccess.
    Has somebody an example?
    Thanks

    Attached is a VI that shows basically how to connect to Access using ADO (ActiveX Data Objects). To use this you absolutely only need one piece of information: the connection string. The easiest thing to do is create a DNS to define the connection, then the connection string is only something like:
    DSN=myDBlink;
    Where "myDBlink" is the name you gave the DSN when you created it. You might also need a user id and password depending on how (or if) the security is set on the database.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    Basic_Query.vi ‏78 KB

  • Excel Get ActiveX References​.vi and closing references -- grrr

    I'm new to ActiveX stuff, but eager to learn! 
    The "grrr" in my Subject line is a reference to how I feel about LabVIEW's documentation from time to time.  I'm a dinosaur who came from text-based programming, and did a fair amount of C coding, so sometimes with LabVIEW I'm left with this awful feeling in the pit of my stomach like, "Good grief!  How much memory must LabVIEW be hogging up in the background when I use this vi?" or "What happens to those variables (wires) in that subVI when it completes but doesn't close?  What are their statuses when I come back in the next time?" or "What if I put a lot of elements into that array the first time and then started from element zero the second time and just put in a few?  What has happened with the memroy that was allocated when there were a lot of elements?"
    Today I'm stewing about this "Excel Get ActiveX References.vi," and what happens to the "ActiveX references" it generates each time I call the subVI in which "Excel Get ActiveX References.vi" lives.  I think that at least one of the "ActiveX references" it generates when I call it is of the type Excel._Application.  Then there appears to be an Excel._Workbook, and others.  You see, I've used "Excel Easy Report.vi" to put some data into an Excel spreadsheet, and I want to tell Excel to do a "Save" on the open spreadsheet.  I think ActiveX is the (a) right way to do that, so I'm wading into the ActiveX fray...  But this "Excel Get ActiveX References.vi" says in its help file, "Do not close ActiveX references opened with the Excel Get ActiveX References VI. References must remain open until the report is closed. Otherwise the error 3001 will occur."  Well, these Excel workbooks that get created by my VI could well stay open until after my LabVIEW VI terminates!
    So (finally), here are some of my quesitons:
    1)  When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existance.  Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references?  I don't suppose so, since subVI's stay in memory until the calling VI closes.
    2)  Now, I come back into my subVI a second time.  New workbook gets created, so I get new references.  Ok, fine.  Uh oh!  What happened to those old references?  I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore?  Won't that cause the dreaded error 3001?  If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)??  Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
    3)  Now, here's the real scary one.  I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open.  All those workbooks are still open.  Presumably, all those ActiveX references I was not supposed to close are still open.  I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates.  But, oh no!  Won't the error 3001 come along then?  I suppose I can just dump it in the shutdown error handling.
    Well, thanks for reading my novel.  I don't know what can be done with LabVIEW documentation to make it more satisfying to folks like me, but perhaps someone can weigh in on all my ActiveX questions here.
    Thank you in advance,
    Steve Brady
    Solved!
    Go to Solution.

    You need to close EVERY ActiveX reference you open.  If you don't you'll end up with some Excel processes running even after LabVIEW exits.  You can see them in Task Manager.
    I, personally, don't like the LabVIEW Report Generation Tool Kit for working with Excel.  I don't think it's flexible enough.  I have a growing library of VIs that I've written that open, manipulate, and close Excel.  Some references I pass from VI to VI and some I close right after I use them.  It all depends on what I'm doing.  If I want to enter read or write data from/to a certain range I'll get the range reference, read or write the data, then close it right away because I have no use for it any more.  On the other hand, when I open Excel or a Workbook I keep the reference until I'm done, which could be later in the program.
    1)  When I go through my subVI once, pointing to one workbook, I'll get one set of references "created" or "opened" or whatever you call it when ActiveX references spring into existence.  Now, when I exit the subVI, is it going to automatically try to "close" those ActiveX references?  I don't suppose so, since subVI's stay in memory until the calling VI closes.
    2)  Now, I come back into my subVI a second time.  New workbook gets created, so I get new references.  Ok, fine.  Uh oh!  What happened to those old references?  I suppose that if I didn't somehow save them off, I've probably lost the ability to get them back (maybe I'm wrong, but I don't need them back), but is LabVIEW going to "close" those old references (from previous times through the subVI) because I can't get to them anymore?  Won't that cause the dreaded error 3001?  If LabVIEW is not going to "close" them, what in tarnation happens to them (the old C programmer in me creeping back out)??  Now it's some oddball, orphaned reference, floating out there, hogging memory, waiting to make something crash intermittently and be a debugging nightmare?
    3)  Now, here's the real scary one.  I think I might dodge the "error 3001" bullet in questions 1) and 2), but now let's say the user closes my LabVIEW application while Excel is still open.  All those workbooks are still open.  Presumably, all those ActiveX references I was not supposed to close are still open.  I really hope that LabVIEW is decent enough to close/erase/delete/blow-away (whatever the right word is) all those ActiveX references which were opened/created by "Excel Get ActiveX References.vi" when my program terminates.  But, oh no!  Won't the error 3001 come along then?  I suppose I can just dump it in the shutdown error handling.
    1)  No, LabVIEW will NOT close those references.  You need to make sure that happens.
    2)  You can save the references in a functional global or use a class but if you're not going to save them close them as soon as you're done with them.
    3)  Your user should not be able to close your LabVIEW application without it going through the shutdown routine you've created for your program.  The ABORT button should never be exposed to the user and you should capture and discard the panel close event so your program ALWAYS shuts down is an orderly fashion.  If you don't you will have fragments of Excel hanging around in your operating system and will have to kill those processes using Task Manager.  That should only be a problem during development, not once deployed.
    I used to program in C and Assembly many moons ago.  You should have seen my first LabVIEW code.  I go back and look at it just so I can see how far I've come in the last 12 years.  I feel your pain.
    Kelly Bersch
    Certified LabVIEW Developer
    Kudos are always welcome

Maybe you are looking for

  • IPhoto Browser option is not showing up in import menu

    Hi, The iPhoto Browser option is not showing up in the drop down import menu in my Aperture 3.4.3.  What gives?  I want to do some targeted photo imports from my iPhoto 9.4.2. Mac Pro, Mac OS X (10.7.5), Aperture 3.4.3

  • Modal window can't show window with viewset???

    Hi all, I use the following code to create a popup modal window. When i embed only one view, it works fine, but when i embed a viewset, and put multiple views into the viewset, it can only pop up a tiny little area with nothing in it. is there a reas

  • Does Final Cut X recognize .m2t files?

    I am hesitant to upgrade to Final Cut X, the version of Final Cut Express I am using right now can not recognize .m2t files from a memory recording unit. Anybody knows if Final Cut X does??

  • Chord notation

    Is there a possibility to make chord tabs like this for example: http://members.fortunecity.com/nrbq1/chords.jpg OR http://z.about.com/d/guitar/1/0/e/7/bbkin_worwor.gif That would be really nice. I know there is a writing option, but i've read that i

  • Unable to to Share Folders in Sharing Preferences (Mac OS X 10.6.4)

    Hi, I've been trying to share a folder on my local network but it does not appear online when saving the settings. I've tried almost everything; changing workgroup, shorter NetBIOS and computer name, and selecting the appropriate sharing settings. My