ActivX control excel?

Dear all,
I have a problem using activeX class to open excel.
The problem is :
In computer "A", I can select "excel object library" from function->activeX->automation open " and then complete the vi with no error prompted; however in computer "B", I find that there are no "excel object library" under activX class selectin list. Both computer are installed full Microsoft office and full labview 6. do any one know about this problem? Because of this problem, I cannot edit the vi in computer B. Can anyone help me, what component is missing? Thanks

Hi Kwai,
There is a known localization issue with LabVIEW 6.0 and Microsoft Excel Object Library. What language version for Windows and Excel are you using? Are you using exactly the same version of Windows and Excel on the two machines? What country and language is chosen under "Control Panel >> Regional and Language Options"?
By making sure that the settings are the same on computer "B" as they are on "A", you should be able to see the Microsoft Excel Object Library under LabVIEW.
If you are unable to have the same versions on computer "B" as on "A", here's a workaround that was reported by a customer that couldn't see the Excel Object Library after upgrading from Excel 97 to Excel 2000:
NOTICE: Editing the Registry is on your own risk! Always back up the registry (Registry >> Export Registry) before making changes to the keys.
When checking in the registry under HKEY_CLASSES_ROOT\TypeLib\{00020813-0000-0000-C000-000000000046}, a path was found for EXCEL9.OLB. However, it was noticed that folder "1.2" for the Excel 8.0 Object did not have a value (path) set. The other
folders (1.0 and 1.3) both have path information. Folder "1.2" was set with the same path as for folder "1.0" and "1.3". After rebooting, EXCEL9.OLB appeared in the in the list of ActiveX Classes in LabVIEW.
- Philip Courtois, Thinkbot Solutions

Similar Messages

  • Control Excel with Access (Complicated Export)

    I would like to have MS Access:
    Open this Excel Sheet: 
    \\Cable\West-Groups\TCR\Construction\Reports\Data.xlsx
    Save it as: 
    \\Cable\West-Groups\TCR\Construction\Dashboard\Data.xlsx
    Close: 
    \\Cable\West-Groups\TCR\Construction\Dashboard\Data.xlsx
    Export the table [05-Job] to the tab [Data] of
    \\Cable\West-Groups\TCR\Construction\Dashboard\Data.xlsx
    Open the Excel Sheet: 
    \\Cable\West-Groups\TCR\Construction\Dashboard\Data.xlsx
    Make the Excel Sheet Visible (this might be required from my past experience with Excel)
    I know this is possible, but I don’t know where to start with the code.
    Note:  Our department is using Office 2013 (if this matters)

    I don't know if this helps, but I do something similar in Excel (to create and control both excel and pdf), but I can't seem to make "what I call simular commands" work in Access to control Excel.
    Note:  On using just the code you gave above, I get a VB Compile Error Expected =
    Sub Button31_Click()
    On Error GoTo ErrorMessage:
    Sheet3.Unprotect
    Sheet3.Range("AE21") = Environ("USERNAME")
    If UCase(Sheet3.Range("AE21")) <> UCase(Sheet3.Range("AE22")) Then
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    MsgBox "At this time, this function works for the serviceability group only"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("a6")) <> 4 Or Len(Range("a6")) = 0 Then
    MsgBox "Error - City Agent"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("e6")) > 18 Or Len(Range("e6")) = 0 Then
    MsgBox "Error - City Name"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("l6")) > 9 Or Len(Range("l6")) = 0 Then
    MsgBox "Error = City Abbreviation"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("q6")) > 2 Or Len(Range("q6")) = 0 Then
    MsgBox "Error - Head End"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("u6")) <> 2 Or Len(Range("u6")) = 0 Then
    MsgBox "Error - Management Area"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("y6")) <> 2 Or Len(Range("y6")) = 0 Then
    MsgBox "Error - Service Area"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    'If Len(Range("ac6")) > 5 Or Len(Range("ac6")) = 0 Then
    'MsgBox "Error - Hub"
    'Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    'Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    'Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    'Exit Sub
    'End If
    If Len(Range("ak6")) <> 2 Or Len(Range("ak6")) = 0 Then
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    MsgBox "Error - State"
    Exit Sub
    End If
    If Len(Range("AN6")) <> 5 Or Len(Range("AN6")) = 0 Then
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    MsgBox "Error - Zip Code"
    Exit Sub
    End If
    If Len(Range("aq6")) = 0 Then
    MsgBox "Notice - Complex Code Is Missing. This is a warning only, continueing with operation"
    End If
    If Len(Range("aq6")) < 4 And Len(Range("aq6")) > 0 Then
    MsgBox "Error - Complex Code"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("aq6")) > 5 Then
    MsgBox "Error - Complex Code"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    If Len(Range("f15")) = 0 Then
    MsgBox "Error - Project Name"
    Exit Sub
    End If
    If Len(Range("as15")) = 0 Then
    MsgBox "Error - Date"
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    End If
    Dim Z As String
    Sheet1.Unprotect
    Z = Right("1000" & Sheet1.Range("K1"), 4)
    Sheet1.Range("K1") = Z + 1
    ActiveSheet.Unprotect
    Range("a1").Value = Environ("USERNAME") & " " & Date
    ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Dim X As String
    Dim fnm1 As String
    Dim flnm As String
    Dim fnm2 As String
    Dim strFilePath As String
    X = Sheet3.Range("BA3")
    Sheets("Export").Visible = True
    Sheets("eSlam").Visible = True
    Sheets("Export").Select
    Range("A1:BF1101").Clear
    Sheets("eSlam").Select
    Range("A1:BF" & X).Select
    Selection.Copy
    Sheets("Export").Select
    Range("A1").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
    flnm = Right("0000" & Year(Sheet1.Range("AS15")), 4) & Right("00" & Month(Sheet1.Range("AS15")), 2) & Right("00" & Day(Sheet1.Range("AS15")), 2) & " CSV" & Z & " " & Sheet1.Range("F15")
    fnm1 = Mid(ActiveWorkbook.Name, 1, InStr(ActiveWorkbook.Name, ".") - 1) 'XLS Name
    Sheet4.Copy
    fnm2 = ActiveWorkbook.Name
    Windows(fnm1).Activate
    Sheets("Template").Select
    Cells(13, 6).Select
    Sheets("Export").Visible = False
    Sheets("eSlam").Visible = False
    Windows(fnm2).Activate
    strFilePath = "G:\Construction\Common\Serviceability\eSlam\" & flnm
    ActiveWorkbook.SaveAs strFilePath, xlCSV
    ActiveWorkbook.Close (False)
    Windows(fnm1).Activate
    flnm = Right("0000" & Year(Sheet1.Range("AS15")), 4) & Right("00" & Month(Sheet1.Range("AS15")), 2) & Right("00" & Day(Sheet1.Range("AS15")), 2) & " SRC" & Z & " " & Sheet1.Range("F15")
    strFilePath = "G:\Construction\Common\Serviceability\eSlam\" & flnm
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=strFilePath & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
    Windows(fnm1).Activate
    MsgBox "Your CSV and PDF documents are now available in the 'G:\Construction\Common\Serviceability\Eslam\' folder."
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Exit Sub
    Sheet3.Range("AE21") = "Do Not Change/Move This Cell"
    Sheet1.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    Sheet3.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    ErrorMessage:
    MsgBox "An error occured, please save and close your file, and try again. If error continues, please contact support staff"
    End Sub

  • Display a sequence in sequenceview activx control with CVI

    Hello,
    I am trying to display a teststand sequence in an activX sequenceView control for an user interface made with CVI. I had a look on the example of national intrument  (...teststand\UserInterfaces\NI\Simple\CVI) but my application is not exactely the same because all buttons are not ActivX controls.
    So I try to display the sequence with this command:
    TSUI_SequenceFileViewMgrSetByRefSequenceFile
    but when i execute i have an activx error : File was unloaded from the test stand engine.
    Can someone help me or having some example to help me.
    Thank you
    Regards

    Hi ,
    There is another example on our web site (http://zone.ni.com/devzone/cda/epd/p/id/3550), with this one you can select on the menu the sequence, and after run it.
    You can adapt it, if you seearch the funciton on the source code.
    regards,
    Christophe S.
    FSE East of France І Certified LabVIEW Associate Developer І National Instruments France

  • How to control Excel Output in Oracle BI Publisher

    I have created an XML report in Oracle E-Business Suite. It displays the output in Excel. The problem is when I generate it's output in PDF it is perfectly fine but when I see the output in Excel, the layout automatically aligns it to the leftmost corner. This behavior is same with all the Excel reports.
    My question is: Is it the default behavior of Excel outputs or Can I control the layout so that it is displayed in the middle not the leftmost corner?
    Can I center align the layout by default? If so , how?
    Regards

    Hi;
    I suggest please refer below which could be helpful on your issue:
    How To Generate XML Output (Excel, HTML, PDF) for FSG Reports [ID 804913.1]
    E-XMLP: BI Publisher Report RTF Template to Excel output is not same as PDF,RTF or HTML format.[Article ID 1515711.1]
    BI Publisher Enterprise Excel Output File Size is Too Large [ID 1271544.1]
    Regard
    Helios

  • ABAP control - Excel spreedsheet generation

    Hi,
    I am programming generation of the Excel document from ABAP. I created additional popupscreen where the Excel should be shown with the generated spreedsheet and I have following questions:
    - I used the example program SAPRDEMOEXCELINTEGRATION2 as a reference for my development. I created my own class and method to generate Excel spreedsheet, I use following objects/methods like in reference program:
    c_oi_container_control_creator=>get_container_control
    CREATE OBJECT container
             EXPORTING container_name = 'CONTAINER'.
    CALL METHOD lc_control->init_control
    CALL METHOD lc_control->get_link_server
    CALL METHOD link_server->start_link_server
    To retrieve the document form from repository:
    CALL METHOD in_bds_document->get_info
      CALL METHOD in_bds_document->get_with_url
    And to generate the XLS:
    CALL METHOD control->get_document_proxy
        CALL METHOD proxy->open_document
        CALL METHOD proxy->get_spreadsheet_interface
    It works perfect, the Excel is shown in the popup dialog window. When the window is closed, following releasing methods are executed:
    CALL METHOD proxy->is_destroyed
        CALL METHOD proxy->close_document
        CALL METHOD proxy->save_document_to_table
        CALL METHOD proxy->release_document
        CALL METHOD cl_gui_cfw=>dispatch.
        IF NOT lc_bds_instance IS INITIAL.
          FREE lc_bds_instance.
        ENDIF.
        IF NOT link_server IS INITIAL.
          CALL METHOD link_server->stop_link_server.
          FREE link_server.
        ENDIF.
        IF NOT lc_control IS INITIAL.
          CALL METHOD lc_control->destroy_control.
          FREE lc_control.
        ENDIF.
        LEAVE TO SCREEN 0.
    So it looks like all the objects are released after the Excel generation. The problem is that when the user immediately run the
    program again, the Excel is not shown - just an empty popup dialog screen. Anybody has any idea what is wrong?
    - Second question. This method requires to have Excel installed on the presentation frontend. So it can be used in normal dialog programming, but how to generate .XLS file in BSP? The code upper can't be used because SAP GUi is not available in this schema. Is the generating .HTML file with CONTENT-TYPE: .xls the only method to generate .XLS?
    Thank you!
    Edited by: Wojciech Walczak ITMAXI.COM on Aug 12, 2009 11:57 AM

    /people/alvaro.tejadagalindo/blog/2009/02/05/excel-ole-and-abap--create-fancy-reports
    https://wiki.sdn.sap.com/wiki/display/Snippets/ALV%2bGrid%2bDisplay%2bwith%2bcheckbox%2bto%2bprocess%2bselected%2brecords%2bat%2bruntime

  • Control Excel properties in ABAP report - Background mode

    Hi,
    We have a requirement to send a excel sheet attachment through mail.This report should have the option to
    to run in background.We should be able to control the properties of the excel sheet.(Eg column width ,cell format)
    I could control the excel properties through OLE object,.But i came to know that OLE objects can not be used in background.
    Is there any other way to acheive this?
    Regards,
    Charumathi

    Hi Charumathi,
    Check the below link. It may help u a little bit.
    [Function module to download to Excel worksheet.;

  • Opening the activeX control "Excel.FormatCondition" class

    I am using activeX controls for excel including the classes Excel._Application, Excel._Workbook, and Excel._Worksheet. I used an open automation refnum to open the application class, then I used property nodes to get to the workbook and worksheet classes. Now I want use the Excel.FormatCondition class. I couldn't get to the class with nodes and methods, so I'm using an open automation refnum as before, but I'm getting "Error 3005 occurred at Automation Open".
    I found another post with advice to register the controls, but I read that the excel activeX controls don't need to be registered--they just work in windows.
    If I do need to register something, I dont' know what. I'm using LabVIEW 8.6, and Office 2007.
    Andrew
    Solved!
    Go to Solution.
    Attachments:
    formatcondition.PNG ‏4 KB

    Here's a picture (scaled-down excerpt of my project) to show how I'm opening the application class and using invoke nodes and property nodes to get to the workbook and worksheet classes. I used a cluster to group the classes that I use later on, so you'll notice that I'm not closing the classes in this exceprt.
    I went through all the drop-down menu's in the invoke nodes and property nodes and I couldn't find a way to get to "FormatCondition" so I figured I'd have to use an automation refnum, and select the "Excel.FormatCondition" class, and another automation open (which is what I tried showing earlier). I understand I have to specify a range, but I'm not quite there yet. (Sorry if I mis-led you, Michael, with my first attachment.)
    Does that clear up my question?
    Andrew
    Attachments:
    ExcelCodeExcerpt.PNG ‏20 KB

  • Split Box Control - Excel 2013

    Hi There, One feature that was very handy in previous versions of Excel was the Split Box control and it has been eliminated in Excel 2013.  Maybe it was because not a lot of users knew it existed, however, I used this functionality on a regular basis.
     For those who do not know, this easy-to-use feature allows the user to separate the spreadsheet into 2 vertical panes or 2 horizontal panes or 4 total panes by clicking and grabbing a small rectangular box at the top, or to the side, of the slide bars.
     This eliminated the steps of Clicking View then Split or View then Freeze Panes.  It was simple and easy to use.  Please return this functionality in future HotFixes!!

    In fact, it was removed: http://office.microsoft.com/en-us/excel-help/discontinued-features-and-changed-functionality-in-excel-2013-HA102919713.aspx#_Toc342560933
    I can`t think of a defendable reason to remove this great control from office 2013!
    It doesn`t matter if not many people know the functionality. If it works and it`s easy to use, shouldn`t be removed.
    For me, was a change that worsened the software. Another big mistake by microsoft that makes me want to stop using their softwares. (Like removing "up one level button" on windows explore.
    Was a great way to split the window. Now it takes much more effort to do it!
    I can`t think of a defendable reason why to do such stupidity! It is a disrespect to the user and an invitation to change software!
    Another bad call from microsoft, a company that inexplicabily have the gift to remove good features from softwares updates, like removint "up one level button" on windows explore or removing "star button" on windows 8 (changes that may be done by designers,
    not by people worried on funcionality!). The only difference between these changes is that the "split box control" may be not as much used to be claimed so strongly as the start button and the up one level.

  • API to control Excel 2003

    Hi,
    I'm looking for an API to control Microsoft Excel 2003.
    I tried to use the JExcel API an POI without real success.
    Is somebocy know a recent tool to do it ?
    thanks,

    Java and Microsoft technology don't mix too well. You'll probably want to look into some technology that allows you to control (D)COM objects from Java. I've heard there's a project called Jacob that does that. Google it.

  • Crystal Report Viewer ActivX Control into an SAP Form

    Hi
    I need to show an Crystal Report Viewer in a SAP form This code show an blanck from.
    I know that only ATL activX are supported by SB1, but I don’t have more information about the Crystal ActivX.
    Dim oFormTST As SAPbouiCOM.Form
    Dim oCreatP As SAPbouiCOM.FormCreationParams
    oCreatP = oApp.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
    oCreatP.UniqueID = "TEST"
    oCreatP.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
    oCreatP.FormType = "TESTFtype"
    oFormTST = oApp.Forms.AddEx(oCreatP)
    Dim oItemX As SAPbouiCOM.Item
    Dim oActivX As SAPbouiCOM.ActiveX
    oFormTST.Height = 400
    oFormTST.Width = 400
    oItemX = oFormTST.Items.Add("TEST01", SAPbouiCOM.BoFormItemTypes.it_ACTIVE_X)
    oActivX = oItemX.Specific
    oActivX.ClassID = "CrystalReports11.CrystalReportViewer.1"
    Dim oRep As CrystalDecisions.Windows.Forms.CrystalReportViewer
    oRep = oActivX.Object
    oRep.ReportSource = "E:\DevLoc\App\bin\FICHETECH.rpt"
    oItemX.Height = oFormTST.Height
    oItemX.Width = oFormTST.Width
    oFormTST.Visible = True
    Some one as an idea ?
    Thks

    Vishal,
    I would like to let you know of an SBO addon that we have created called CrystalWave. This addon integrates Crystal reports with B1. This might save you a some time trying to recreate the wheel. Please take a look at the following link:
    http://www.twbs.com/CrystalWave.html
    YOu can download a fully functional copy at http://www.twbs.com/selectcwversion.html
    This will work only on the SBODEMO_US company.
    Let me know if you have any questions.
    Gopal Viswanathan

  • Control Excel options from SAP

    Hi Experts,
    In excel I want to add the expiry date from ABAP code.
    I am generating the excel and at the time of generation I want it to restrict to some people which I am able to do
    using function ADD of excel--> permission
    In the F1 of function ADD it is mentioned that we can pass 3 variables
    --> Email
    --> permission type
    --> expiration date
    I tried various format of date but this is not working.
    When i call the bewlo mentioned code, I am able to add the user restriction
      CALL METHOD OF w_permission 'Add' = w_usrperm
        EXPORTING
        #1 = email
        #2 = 1.
    when i try to use the 3rd parameter, it fails and doesn't even add the user restriction.
      CALL METHOD OF w_permission 'Add' = w_usrperm
        EXPORTING
        #1 = email
        #2 = 1
        #3 = sy-datum.
    can you help me on this.
    Regards,
    Yadesh

    try to pass the date with the following format:
    write sy-datum to lv_datum DD/MM/YYYY.
    (change the format DD/MM/YYYY according to your regional settings)
    if it doesnt work then try
    concatentate '#' lv_datum '#' into lv_value.
    in Excel some date values must be specified with # around... but I'm not sure if it is the case for you

  • VBScript control Excel via COM works in Excel 2010 but NOT in Excel 2013

    Hi All,
    Does anyone know of any reason why VBscript that using COM to connect to Excel and perform some basic functions would stop working when I move to Excel 2013?  I have several VBscripts that run perfectly in 2010 but I get the following error when I try
    using Excel 2013:
    OLE error code 0x80070001:Unknown COM status code
    I can't even get a very simple test VBscript to open a new workbook in Excel.
    Has anyone come across this error or have any suggestions regarding the cause and/or resolution?
    Thanks in advance!
    John

    We cannot tell unless you post an example of the code the causes this error along with the complete error message.
    ¯\_(ツ)_/¯

  • Crystal ActiveX Report Viewer Control 11.0 not exporting to excel

    I have a wierd problem, I have crystal report XI R2 installed on the server. Client when login on the my application gets prompt to install the activx control; installing of which the report is opening fine.
    Whenever the user clicks on the "Export to" button on the activeX and selects excel; the export dialog box just hangs. All other export option pdf, word, rtf are working fine except Excel.
    Can someone help me in this....

    Hello,
    This was a known issue which was solved with the Service Pack 2
    https://bosap-support.wdf.sap.corp/sap/support/notes/1205451
    So I recommend you to upgrade your version of CR XIR2 to at least SP2.
    Regards,
    Philippe

  • Using Excel with Visual C++ 6.0 (need a graph control that behaves as much like the one in CVI as possible)

    I hate to beat this to death but I was unable to find a
    clear answer to this question.  Does NI provide Excel control from within
    Visual C++ 6.0? 
    I read that NI supports the ANSI-C library only for Visual C++ 6.0 users:
    Thread : "Re: Benifits of using measurment
    studio for VC++ 6.0?"
    NI REP : drohacek
    Quote  : "we made the decision to support Visual
    C++ 6.0 users only through the ANSI-C interface and not through the Measurement
    Studio MFC-based class libraries."
    If there is a suggested way of controlling Excel from within Measurement Studio
    for Visual C++ 6.0 then I’d love to know it. 
    If not, can a plain statement be made basically stating that if you want
    to control Excel you can’t use a Visual C++ 6.0 environment even with Measurement
    Studio support?
    With .NET of course you can just decide to have Excel support added during
    project creation.  CVI can act as an ActiveX server and easily control
    Excel just by building off the examples shipped with CVI.  I see that
    there is support, using the Measurement Studio for Visual C++ 6.0 Project Wizard,
    for taking existing CVI projects and converting them to Visual C++ 6.0 projects
    or for calling CVI libraries from a .dll from within Visual C++ 6.0.  I suppose I could do the work
    in CVI and then convert the project but I'm so deeply tied into all my MFC calls that I don't see
    how I can cleanly include the CVI libraries into my existing VC++ 6.0 projects.
    What I'm really after here is a visual graph control like the one in CVI that I
    can use from Visual C++ 6.0.  I purchased a 3rd party graph control for use
    in VC++ 6.0 that works well but isn't really visual.  I mean you can't
    enter any values in it until you run the program and fill it out programmatically. 
    Then you can see which columns are two narrow, quit the program, adjust the
    column width of your now empty control, and repeat, until you get the thing
    looking the way you want.  If I could call into Excel from within Visual
    C++ 6.0  the way I do from within .NET
    then I could use Excel to hold the table and just read in the values into my table
    control at run time.  Basically I'd use Excel as a visual development tool
    for all my tables.
    I do all my coding from within CVI and Measurement Studio for Visual C++
    6.0.  I'd use CVI for everything if I didn't depend so heavily on certain
    outside controlled C++ .dll's.  Could you please suggest then what I can
    do to get Excel support for Visual C++ 6.0?
    Last question :
    Is there any plan to ever have a NI table control like the CVI table control for
    use in Visual Studio?  One that you can
    completely set up before you do any compiling? 
    I imagine that the way Microsoft sets up their environment makes this idea impossible.  Otherwise someone would
    have come up with a truly “visual” table control before now.
    Thanks,
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    Hello Grant
    You can most certainly use Excel with VC++ 6.0. Measurement Studio won't provided you with any classes to talk to Excel in VC++ 6.0. This is because Excel allows control via Automation and you can use its automation API to do anything you need with Excel. This is what CVI uses as well.
    You can see this MSDN article on how to set this up. This mentions VC.NET, but it should work the same way.
    Here is one that talks about VC 6.0 and Excel.
    Here is a code project article about this.
    Even with .NET, you have to do thru the Excel Automation support. Excel started shipping with Primary Interop Assemblies (PIA) which are .NET wrappers about the Excel Automation object model. C++ Automation is definetely not as nice as .NET, BTW
    See this document for more information about the Excel object model.
    I would not recommend using the CVI Excel libraries if all you want to use them for is Excel automation. You will end up creating un-necessary dependencies and go through extra layers that way. You can make calls straight to Excel from VC++ without requiring CVI.
    One quick observation about your excel approach. If you decide to use Excel as your table, you might be requiring everyone who uses your application to have Excel installed on their machines. Just wanted to make sure this was acceptable to you.
    Have you looked at the Datagrid Activex control, which is one of the common controls that ships with Visual Studio? You can add it to Visual Studio by right-clicking and picking it from the list of installed activex control. If you have not already, you should check it out.
    Microsoft has made significant improvements in the number of controls they provide with .NET. They have a Datagrid control that seems to be what you need.
    Measurement Studio did add some high level classes for Excel and Word Automation that simplify some common tasks, but these exists for VS 2003 C++ and VS 2005 C++, not for VC 6.0. Underneath, we end up using the same Excel automation classes, so you can easily setup something similar for VC 6.0. Plus you can find alot of references online on how to use the Excel Automation object model with C++.
    We currently have no plans in Measurement Studio to create a table control unfortunately. I am assuming when you said graph, you actually meant table, since Measurement Studio already  provides a ActiveX graph controls for VC++ 6.0 that is very similar to the CVI graph.
    On a side note, VC++ 6.0 is really really old. Have you considered upgrading?
    To summarize
    - Yes, you can use Excel with Vc++ 6.0 without mstudio.
    - Try using the Datagrid Activex control if you just need a table.
    - Measurement Studio provides high-level excel and word classes for VC++ 6.0
    - Measurement Studio provides a graph control for VC++ 6.0 which is very similar to the CVI graph.
    - Measuremnt Studio does not have a table control.
    - VC++ 6.0 is really really old. Have you considered upgrading?
    Bilal Durrani
    NI

  • How to control MS excel from labiew ?

    I'm using Labview 5.1 and i would like to Know if is possible to totally control MS excel from Labview: to write into a specific file of MS excel wich contain already some information.

    Generally you use ActiveX to control Excel from LabVIEW. The best way to understand that would be to run 'Write Table to Excel" example that ships with labview. You can access that example by going to Help>>Search Example and then under "activeX".
    Also for more flexible control of excel from labview you can also use the latest "Report Genaration Toolkit" for labview that allows you to interact not only with Excel but also MS Word.
    http://digital.ni.com/worldwide/bwcontent.nsf/web/all/E899E563ABE94D1D86256A1800718B6D
    Hope this would help.
    A Rafiq
    National Instruments

Maybe you are looking for