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

Similar Messages

  • 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 merge cells in excel using X++ in AX 2009

     Hi all,
     How to merge cells in excel using X++ in AX 2009?
     for example i have 3 cells (A3:C3) i need to merge this 3 cells using X++
    can any one sujjest please
    Thanks in advance

    Hi,
    WinForm technology does not support X++ related cases.
    I just checked this link
    http://msdn.microsoft.com/en-us/library/aa867122.aspx and haven't found a related forum.
    I'll move your case to where is the forum for so that you may get some help about this.
    Regards,
    Barry Wang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to save OTF to Memory using E_PRINT_PO?

    HI All,
    How to save OTF to Memory using this FM: ME_PRINT_PO.
    Please let me know.
    Ashok

    No, it should be there, becos inside that FM this fm is also calling, SAVE_OTF_TO_MEMORY. but it is calling in Enhancement point. im not able to put the break point there. i think that code is not executing.
    im getting this error: Breakpoint not set since enhancement ISAUTO_SCH_EMM_SAPLMEDRUCK is switched off.
    Please help me on this.
    Ashok..

  • 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

  • Save data to excel using froms_ole builtin

    Hi All,
    can somebody send me an example how to save any data to excel workbook
    using FORMS_OLE builtin package (or OLE2 in later versions) ?
    I'm working with forms 4.5
    Thanks
    Brano

    For merging of cells you can refer following code!
    [Merging of cells.|https://www.sdn.sap.com/irj/scn/wiki?path=/display/community/oleconceptfordownloadingthereportoutputintoexcel]
    Regards,
    Lalit Mohan Gupta.

  • Creating a table in Excel using ActiveX functions

    Hi,
    I am new to labview and have have a project where i need to create tables in labview using activeX, i cannot seem to get the Invoke node Table (under range) to work, any help would be much appreciated.

    This question is not related to LV at all. So in general, this question is more for MSDN (Microsoft Developer Network).
    That being said, here the steps you have to implement in LV:
    Open Automation Server Excel._Application
    Set property Visible to true (otherwise, you won't see the result unless you save the workbook)
    Create a Workbool
    In the Workbook, create a Worksheet (that's what you call a "table")
    That's it.
    Norbert
    PS: Due to "reference lifetime", you want to keep the VI running (e.g. event based waiting for a button press) otherwise Excel will shutdown as soon as you release the reference to Excel._Application.

  • How to save webi report created using InfoView into my local PC

    Hi Experts,
    I am creating a Web Intelligence document using infoview and once the report is ready, i want to save it in my local PC for later refresh.  How can i save that using Infoview ? I don't want to save the report in the server(repository).
    Regards,
    Suresh

    After saving WebI reports to Local PC also, one can't see them COZ of .wid extension, to view them again we need WebI installed.
    You can Save them to Excel or PDF or CSV to your local PC and Schedule them to get latest data as well.
    Thank You!!

  • How to save macros in excel for all workbooks permanently?

    HI all,
    I have created macros in the Excel 2007 and have saved it. And its working fine. But i open the same excel sheet again, I cant see any macros in the excel sheet?
    Can anyone pls let me know how to save the macros permanently in the Excel Sheet ?
    Thanks
    Pooja

    Hi ,
    I have saved as .xslx format but still the same unable to see the macros in the same excel sheet.
    My intention is that when ever i open any excel sheet in the my computer those macros should be available for me!!
    Thanks
    Pooja

  • How to register for class while using ActiveX

    Hi
    I am trying to use ActiveX to send an email with Microsoft Outlook. I have found an example Vi. but i was getting an error with code "-2147221164" (Class not registered in Outlook_Mail-1.vi). How to register for that class and what are the files required for that registration.
    Attachments:
    Outlook_Mail-1.vi ‏31 KB

    Here is a picture of the Photosmart eStation:
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • How to add dropdown in excel using java?

    First of all sorry for creating new topic... i searched for it but i couldn't get it...
    Guys do you have any idea on how to add drop down in excel using Andy Khan's JExcel API? Or is there any other way?

    Sounds like a question for Andy Khan or the JExcel forum.

  • Xy graph in excel using activeX

    Hi
    I am trying to plot a XY graph in excel using Active X. I have two coloums of data one should be X the other should be Y. I am using XlXYscattersmooth graph type and giving the range as A1 to B5. But when the excel plots it, I am getting two series rather of X data points rather than XY. I know I am doing a simple mistake in choosing some variable but I am not able to figure out where I am going wrong.
    Can anybody please look at my code and correct the code in order to get a XY plot rather than getting two different series.
    Thanking you in advance
    Nitin
    Attachments:
    excel4.vi ‏155 KB

    Hello
    Here is that Set Cell Value with Range.vi
    Regards,
    Nitin
    Attachments:
    Set Cell Value with Range.vi ‏45 KB

  • How to save the edited datagrid using array collection?

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        title="demo2">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <fx:Script>
                        <![CDATA[               
                                  import mx.collections.ArrayCollection;
                                  import mx.events.FlexEvent;
                                  import spark.components.gridClasses.IGridItemEditor;
                                  import spark.components.gridClasses.IGridItemRenderer;
                                  import spark.events.GridItemEditorEvent;
                                  [Bindable]
                                  private var myDP:ArrayCollection = new ArrayCollection([
                                            {label1:"Day1 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day2 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day3 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day4 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day5 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day6 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "}
                                  protected function myDG_gridItemEditorSessionSaveHandler(event:GridItemEditorEvent):void
                                            // TODO Auto-generated method stub
                                  protected function button1_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            navigator.popView();
                                  protected function button2_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            myDG.editable=false;
                                            myDP
                                  protected function myDG_exitStateHandler(event:FlexEvent):void
                                            // TODO Auto-generated method stub
                        ]]>
              </fx:Script>
              <s:DataGrid id="myDG" x="10" y="45" width="460" height="240" dataProvider="{myDP}"
                                            editable="true" exitState="myDG_exitStateHandler(event)" fontSize="11"
                                            gridItemEditorSessionSave="myDG_gridItemEditorSessionSaveHandler(even t)"
                                            rowHeight="30" variableRowHeight="true" selectionMode="singleCell" >
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="label1" headerText="day" editable="false" />
                                            <s:GridColumn dataField="label2" headerText="9-10am"/>
                                            <s:GridColumn dataField="label3" headerText="10-11am"/>
                                            <s:GridColumn dataField="label4" headerText="11am-12noon"/>
                                            <s:GridColumn dataField="label5" headerText="1-2pm"/>
                                            <s:GridColumn dataField="label6" headerText="2-3pm"/>
                                            <s:GridColumn dataField="label7" headerText="3-4pm"/>            
                                  </s:ArrayList>
                        </s:columns >
              </s:DataGrid>
              <s:Button x="404" y="10" width="53" height="27" label="Back" click="button1_clickHandler(event)"
                                    fontSize="13"/>
              <s:Button x="24" y="10" width="56" height="27" label="Save" click="button2_clickHandler(event)"
                                    fontSize="14"/>
    </s:View>
    please help me with this code...i dontknow how to save the data edited in the datagrid back to my arrayollection!!!

    please help with this......

  • How do I autosize columns in Excel using ActiveX in Labview

    I found the ExcelExamples.llb but nothing that describes this. My data is sometimes bigger than the default column width.
    thanks

    How about using a macro to run the column autosize function?
    I cheated, and recorded an autosize operation on a column, and then looked at the vb code behind the macro...
    Columns("D").EntireColumn.AutoFit
    should do the trick.
    In the excelexamples.llb, they seem to use macros to perform other functions, so maybe this is a way to achieve the autosize function that you require.
    Hope this helps...
    JB

  • How to save html as Excel file im java

    Hi to all
    How can i save html file as Excel file in Java
    If any solutions plz help Me

    Thanks for ur reply
    Source URL is::http://www.sttpc.com/reseller/price.htm
    Target is to save table data into Excel Sheet.
    Upto saving that file as Excel file its working (using I/O).
    When iam trying to read excel sheet data then iam getting OLE Exception.
    plz suggest me other Alternate solutions to overcome this problem.
    I tried htmlparser from sourceforge.net i got partial ouput.But i want dynamic solution.
    Thanks.

Maybe you are looking for