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

Similar Messages

  • How to save then quit excel using activeX

    The task that I need to do is open existing excel file, append data to the last row, save data then close it. Everything works fine except saving the data. I used property workbook note to save then invoke node to close a workbook then invoke node to quit excel application. I watched and see that the data is written to the sheet but when I closed it, it is not saved.
    System: Window NT and Excel2000
    Thank you

    mai wrote:
    >
    > The task that I need to do is open existing excel file, append data to
    > the last row, save data then close it. Everything works fine except
    > saving the data. I used property workbook note to save then invoke
    > node to close a workbook then invoke node to quit excel application.
    > I watched and see that the data is written to the sheet but when I
    > closed it, it is not saved.
    >
    > System: Window NT and Excel2000
    Use Task Manager to check if Excel is still running.
    I find that the programmatic close of Excel doesn't work. Excel is left
    running until you actually quit either LabVIEW or the built app!
    Side-effect: if you then launch Excel to view a document, the screen
    isn't redrawn right.
    Mark

  • 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

  • Implementing Save dialog in jsp

    Hi all,
    I need a small help. I have one excel file and one link called download. When we press the "download " link it should prompt us to save and the file must be saved.
    please help me how i can implement save dialog.
    Any help is appreciated.
    Thanking you in advance.
    Regards,
    Devi.

    Take a look at this post: http://forum.java.sun.com/thread.jspa?threadID=5170452&messageID=9655276
    ( Remember to update the filestreams to buffered streams if you do use the sample )

  • I am having trouble with an excel file wanting to save when no changes were made & opening as read only for the 2nd person - but allowing them to save the file.

    1) I am having trouble with an excel file wanting to save when no changes were made.  As soon as you open the file and exit.  It prompts for a save.
    All excel versions are 15.0.4701.1002.
    Using a table.
    the functions CELL, OFFSET, TODAY, INDIRECT, NOW, INFO and RAND are not being used.
    2) Same file.   2nd person is being told they are opening the file as read only - but when they are quitting excel prompts them to save the file. 
    Everything was working fine.  I started having problems with Excel, IT wiped my version out and re-installed office. 
    File is on networked server HP - Windows Server 2012 Essentials.  
    We are all on Windows 8.1 Pro.
    I really hope someone can help - the excel expert had no answer - and passed me along to here.

    I copied the whole file and started deleting worksheets one at a time and testing it by closing it and re-opening it then closing it again – to see if it wanted to save. 
    Once all the pivot tables were deleted – the problem went away. 
    I found that some of the pivot tables had automatic refresh upon open, so this caused the excel to think data had changed. 
    It is fixed now.  By clicking on one cell of the pivot table, analyze, options, data and uncheck the 3<sup>rd</sup> square down to not automatically refresh.  NOT A NETWORK ISSUE.

  • 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.

  • I need a code to be able to save my form to excel with a save button????

    This is the codes very simple right now but i can not get a code or understanding of what to put for the import part or Dim file path. The excel sheet i have saved in C:\connecttoexcel\ but do have the exact code needed.
    Public Class Mesquite
        Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        End Sub
        Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
            IsNumeric(TextBox1.Text)
        End Sub
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        End Sub
        Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
            TimeValue(TimeOfDay)
        End Sub
    End Class

    I'm sorry but there isn't enough information here to help you.  You can't "save a form to Excel"... you could copy data from the Form's controls into an Excel spreadsheet, but it doesn't make sense to "save a form".  There's
    also no indication of how you want to interface with Excel... will there always be a version of Excel installed on the computer running your program?  If so, what versions of Excel do you need to target?  What version of Visual Studio are you using? 
    What Windows OS will you be targeting?
    Please explain what you are trying to do in greater detail, answering not just the questions above, but also providing a detailed description of what you are trying to achieve.
    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

  • HT204266 My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

    My iPad (version 1, IOS 5.1) has quit connecting with the store. I am unable to update or buy any app. I did a reboot and a reset with deleting the data. I can not find anything in support for this problem. Any help will be appreciated.

  • Finder sidebar not updating with applications open/save dialog boxes

    Hi all,
    I've searched the threads and can't seem to find an answer to this recurring issue that I'm having.
    I save folders to current projects in the Finder sidebar. However, I find that when I try to find those sidebar folders from within the open/save dialog applications that it is often times and old version of the sidebar. In the image linked below note the Finder sidebar on the left and the InDesign CS sidebar on the right. The list of folders is different. The version via InDesign seems to be an older cached version.
    Screen capture: http://www.fabianross.com/forum-images/screen-capture.png
    Does anyone know how to update this cached version to see the new list of folders?
    Thanks,
    Jerry

    Try deleting this file: com.apple.sidebarlists.plist
    /Users/YourName/Library/Preferences. Drag that file from the Preferences folder to the Trash, empty the Trash and reboot. See if that helps...
    Seems to me that Adobe is very picky about where the files are kept on the hard drive. You might not want them in the Sidebar. Whenever you do an Adobe software update, the installer needs the path to where those files go. If it's missing in action, it can wreak havoc.
    Make sure when you do Adobe updates, if there is a link included or a Read Me file, check that out first before installing anything.
    Run Disk Utility and Repair Disk Permissions BEFORE and AFTER any software updates:
    Launch Disk Utility. Select MacintoshHD in the panel on the left, select FirstAid, then click: Repair Disk Permissions. Quit DU when it's finished and reboot.
    Carolyn

  • My calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    my calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    Hi,
    To configure your ODBC DataSource, go to Control Panel ---> DataSources(ODBC) (If you are in a Windows environment).
    Select the tab System DSN. If you have not added your data source, then do so by clicking on the Add button. If you have added the datasource, click on the Configure button to configure it.
    Give the datasource name, then the database name.
    You have to give the hostname, service name and server name. I guess, in most cases, the datasource name and host name will be the same, service name and server name will be the same. If you are using TCP/IP, the protocol will be onsoctcp.
    There will be a file named Services under C:\WINNT\system32\drivers\etc where you have to give the port number for accessing this server.
    It will be like this <service name> <portnumber>/tcp
    Hope this helps...
    best wishes,
    Nish

  • I have an iPad air and have downloaded the microsoft app excel.  I have an email with an excel attachment.  When I "tap to download" the attachment, it auto converts to a PDF file.  I want it to open in excel.  Please help.

    I have an iPad air and have downloaded the microsoft app excel.  I have an email with an excel attacment.  When I "tap to download" the attachment, it automatically converts to a PDF file and opens as a "view only" document.  I want it to open with the excel app so I can see and update the spreadsheet.  Please help.  Thanks!

    If Excel works as do other apps, you should be able to tap and hold on the attachment and then select "Open in Excel" in the window that will open. Note that you need to be subscribed to and signed into Office 365 to be able to edit documents in Microsoft's apps.
    Regards.

  • 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.

  • 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

  • Save dialog with file type selection

    I'd like to give the user a save dialog with a dropdown
    showing a list of file formats to select from, as is pretty much
    always the case in normal save dialogs (even if there's only one
    acceptable file type.) It servers both as giving the user options
    and letting the user know the file format being saved to.
    I can't seem to figure out how to do that in AIR.
    File.browseForSave does not take a FileFilter array, and does not
    provide a default name option. I can get the default name by
    resolving a path for the File object first, but this doesn't show
    the user the various filetype options they have, and even if they
    knew them they would have to manually type them in the dialog. Am I
    missing something?

    FOUND THE PROBLEM!
    I have several timelines in the project, and most of them are titled things like "window dub w/timecode". I found one that was titled "interviews" and tried to render that. The Save dialog appeared, only when I rendered from THAT timeline. So I started to look for differences between the timelines.. then it dawned on me that all the timelines that don't render have the "/" character in the title. Adobe should warn that this character is not allowed, rather than allow it and then behave weirdly. Could have saved me hours of thrashing about!

  • Media Encoder, No File Save Dialog with New XDCam Project

    I've started a new project last night and I got it edited toda
    y. It's XDCam 24P timelines, very simple linear
    string of short 45 second clips of interviews with executives.
    The timeline behaves normally in every respect. Except, when I attempt to render it to any format in Media Encoder, I never get the File Save As dialog. I press OK and the Media Encoder settings goes away, then, a second later, reappears. It took me a few moments to realize something was wrong.
    I rebooted the computer, thinking Premiere was just corrupt in memory, as sometimes happens, but after a fresh start, the same behavior with the Media Encoder. Now I'm really worried, because this is a corporate event video with a deadline.
    Just to check, I tried opening a prior project and tried to render anything in that project. This time I get the Save As dialog, which is expected. So I return to the corporate event project and try again to render anything within that project. The encoder settings keeps redrawing when I press OK and I cannot save anything.
    Thinking my project was corrupted, I copied the assets and made a new project and pasted them into the new, blank project. Once again, I cannot render anything. All I get is a redraw out of the Media Encoder settings screen.
    This is a very simple project. There is nothing unusual about it that could cause this freakish behavior, except the lighting used at the event was mostly yellow. Apparently it doesn't like something about my footage, but I cannot re-shoot this one-time corporate event! If a reboot didn't fix it, and other projects still work normally, then it's a real head-scratcher. This is new behavior that I've not encountered in 3 years of using CS3.
    I'm out of ideas. If it's XDCam my footage, then I'm dead in the water here!

    FOUND THE PROBLEM!
    I have several timelines in the project, and most of them are titled things like "window dub w/timecode". I found one that was titled "interviews" and tried to render that. The Save dialog appeared, only when I rendered from THAT timeline. So I started to look for differences between the timelines.. then it dawned on me that all the timelines that don't render have the "/" character in the title. Adobe should warn that this character is not allowed, rather than allow it and then behave weirdly. Could have saved me hours of thrashing about!

Maybe you are looking for