Excel ActiveX Development

Hi all,
I would like to know where I can find some guidance and examples on Excel ActiveX development.  Is there a thread dedicated to Excel development in LV?
Basically all I want to do is create a report in Excel based on some control values etc within a VI.
I don't have Report Gen Toolkit and don't want to purchase.  I have seen that it can be done using ActiveX functions.  Is this the way to go?
Thanks for your help!
Battler.

The excel board is located in the breakpoint:
http://forums.ni.com/t5/BreakPoint/Excel-Board/m-p/379682
And yes, if you don't want to purchase a toolkit, using ActiveX on your own is the way to go.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml

Similar Messages

  • Excel ActiveX error in exe: library not registered

    Hi,
    I wondered if any of you can help me as I'm at a bit of a
    loss. I have an application that is complied to exe, and installed with
    an installer in LabVIEW 8.5.1 that uses the Excel ActiveX interface to
    write to an xls file. In development and on all of my testing this
    seems to work fine (with Excel 03 and 07) but I have just received a
    bug report whereby on a particular install the following error has been
    thrown form my Open Excel VI (see attached code). Apparently it was
    working but this machine has recently upgraded some data management
    software (Goldmine 6.0 -> 7.5) and since then it hasn't worked.  The error generated is:
    Error code:-2147319779
    source: "Library not registered."
    Troubleshooting
    is complicated a little as this is running as an exe and the source
    code seems to work fine on my development machine.
    Any ideas would be GREATLY appriciated!
    (my current inclination is to ask the customer to resintall Office and
    Goldmine and then reinstall the LabVIEW app - so far he has only tried
    reinstalling the LabVIEW software)
    Shaun
    (this message is also posted on Lavag.org = http://forums.lavag.org/Excel-ActiveX-error-in-exe-library-not-registered-t11912.html)
    Attachments:
    Open Excel.vi.png ‏52 KB

    It would really help to see the relevant code, and to know which version of LabVIEW is being used.  I notice the original code was developed on LabVIEW 8.5, and the Poster mentions older versions of Office (and is writing an .xls instead of an .xlsx file), suggesting the original code is about 7 years old.
    About 4 years ago, I got frustrated with trying to use ActiveX, and NI developed a much more robust Report Generation Toolkit.  I've adopted the RGT and haven't looked back.  Most of the weird errors I used to fight are gone, and building executables is (mostly) no pain (there's a small glitch that required manual OK-type intervention when you first encounter the Toolkit in a Build).  I'm guessing that it should be pretty easy to rewrite your code using the RGT in place of ActiveX, and I'm willing to help ...
    Bob Schor

  • Excel ActiveX: Server Execution Failed Error

    I'm using my own ActiveX VIs to control Excel. I take a text file and create a chart from some of the columns, then print the chart. I'm getting a "server execution failed" error when I call PrintOut on the chart object. I understand this error stems from the fact that I'm developing on Excel 2007 and testing on 2003, but upgrading all of the computers that will use this software is not going to happen.
    I've fixed all other incompatibilities between versions, and the chart is created correctly, but when the PrintOut method is reached, I get the error. Has anyone ran into this and worked around it? Is my only solution to downgrade my machine to Office 2003?

    Here's a few details on that particular error, both of these articles have some workarounds:
    Error -2146959355 When Using ActiveX or the Report Generation Toolkit
    Error 2146959355 When Running Exe on Machine With Different Version of Office
    Tim W.
    Applications Engineering
    National Instruments
    http://www.ni.com/support 

  • Excel ActiveX Problem

    Hello All,
    I think every body knew that If I move spreadsheet ActiveX control from one version to other. It will not work and we need to reconnect. 
    I built an application, which can be used in several countries and mostly I am facing the problem with ActiveX. Because of version change.
    Now even we are thinking not to give Microsoft office to the customer to reduce the cost of machine.
    So is there any LabVIEW internal tool, which can used to design as Excel and use. It is so important that not to use any ActiveX control of Microsoft.
    Please let me know, if any body knows,
    Thanks,

    LVTestek wrote:
    Hello All,
    I think every body knew that If I move spreadsheet ActiveX control from one version to other. It will not work and we need to reconnect. 
    I'm not sure that everybody knows that, and I'm not quite sure I actually understand what you're saying here. Yes, if the ActiveX interface changes then you need to update the code to reflect the API change. I don't understand what you mean by "reconnect".
    Now even we are thinking not to give Microsoft office to the customer to reduce the cost of machine.
    So is there any LabVIEW internal tool, which can used to design as Excel and use. It is so important that not to use any ActiveX control of Microsoft.
    The only thing that NI has available is the Report Generation Toolkit, but that requires Office in order to work. I do recall people asking about an interface to Open Office, but I don't recall how far any kind of development has gone related to that. You can do a search for "Open Office" and see what's available. What are you trying to create? Are you trying to create spiffy reports, or just saving data? If it's the latter you can probably get away with simply writing text files using the Write to Spreadsheet File VI or the Write to Measurement File VI.

  • LabVIEW - Excel - ActiveX

    We have an application that may need to work with Excel.  However, we may have to develop on a Sun machine.  If this is the case, I assume I won't have ActiveX available to me.  Can I use LabVIEW and Excel.  If so, how do I go about it without using ActiveX?

    I think your only option will be to save the Excel files as comma or tab separated text files. Then you can use Read From/Write to Spreadsheet File. Imho, even if you were to develop under windows, this would still be a better option if all that you have to do is populate a spreadsheet with data.

  • Excel ActiveX invoke nodes are broken

    I am using LabVIEW 2007.  We are using a VI that runs on most of the PC's in our facility however on some the "invoke node" related to Excel functions don't operate. They are broken and the VIs won't run.  We get errors that the "Invoke Node: contains unwired ro bad terminals".  When going to select methods or properties not all of the properties are shown as seen on the functional PCs. Some of the properties are missing from the selection menus, thus making it incompatible.
    Has anyone seen this problem and a solution?
    Thanks
    Manliff,

    What about separating the compiled code from the source?  I recognize that this will only work in LV2010, but I expect that that will prevent the compiler from breaking activeX code that depends on a different version than the local one...
    Testing this idea is on my to-do-list, but I was wondering if anyone has tried it already.
    -Barrett
    CLD

  • Excel ActiveX: Count Rows

    Hi, I am trying to simply count the used rows in an excel spreadsheet (which I have done in the past).
    Attached is a simple vi which I am trying to get to work.  On my development PC, this works fine, counts the rows etc...on this PC I have Excel 2003.
    When I create an EXE out of this VI and put it on another PC with Excel 2000, it returns "0" for the number of used rows.
    Can ANYONE help me here, this is driving me insane.
    Working in 7.1 (can use 7.0 or 8.0 if it makes it easier)
    Thanks,
    Ryan
    Ryan
    LV 7.1
    Attachments:
    test.vi ‏59 KB

    It is limiting but I place the biggest blame on Microsoft for changing the properties and methods so much between different releases. You could put all of your Excel functions in a library that you call dynamically. That way, you don't have to re-build the exe but just distribute the library specific to whatever version of Excel you need to support. Unless you really need some specific Excel formatting, you could also save to comma/tab delimited text files. All versions of Excel can open them and you won't have to make a career out of modifying your application for as long as Excel is going to be around.

  • Excel activex call changes between Office 2000 and Office XP. How does one manage that?

    I have several Active X calls from within a VI. One in particular is
    the Excel Cell Value property node in Office 2000. MS has decided to
    call it Excel Cell Value2 in Office XP.
    I have built and exe on a machine with Office 2000 and can run the code
    on a machine with Office XP, but I can not build on the machine with
    Office XP. I can also run a VI with that call
    on the Office XP box, but if I mass compile the VI I get the broken arrow.
    I guess I am confuesed as to why it can run but not compile. If the
    ActiveX call is not there for the compile why is it there for the run?
    If I can expect this does it work in reverse where I
    build on an Office XP box and run on a Office 2000 box?

    These problems you are experiencing do stem from the ActiveX changes between Excel versions.  When you mass compile LabVIEW checks to see if everything is linked correctly, including ActiveX portions of your code.  Since there are slight changes the LabVIEW compiler detects something is wrong, but cannot isolate the problem.  You might need to force a recompile of that VI.  Check out this link.
    http://digital.ni.com/public.nsf/websearch/50D06DEE8B9DC018862565A0006742F2?OpenDocument
    Hope this helps!
    Andy F.
    National Instruments

  • Excel ActiveX slow when not connected to internet

    Using LabVIEW 8.5
    I hope someone has some insight into this problem because I'm lost. I have a program that communicates with a VXI instrument using a direct connection (crossover cable). I have a subVI in the program that takes data already in the program and writes it to an exisitng Excel workbook using ActiveX. When I run this subVI by itself when I have internet access (DHCP enabled), the subVI takes <2 sec to complete. However, when I am conencted to the instrument using a crossover cable, the subVI occassionally (about 1 out of 3 runs) takes >13 sec to complete. As a test, I connected back to my normal network but kept the manual TCP/IP settings (so Local Area Connection shows a network connection but I can't access the internet). I got the same result, with the subVI taking >13 sec to complete at time. Can anyone explain this behavior? Any remedies? I assume Excel or ActiveX is trying to access the internet, but that doesn't make a lot of sense.
    Perhaps a related issue is when I don't have internet conection LabVIEW has problems updating the Block Diagram (i.e. a right click on a wire takes several seconds to bring up the shortcut menu and causes LabVIEW to freeze). Any rememdy for this? I don't know if it is completely related to the issue above, because I created an installer of the subVI and it still exhibits the same behavior (unless maybe its a LabVIEW Run TIme issue?)
    I've attached the necessary VI's. To test you'll need to create some Excel workbook and then change the File Path control in the subVI. Also change your TCP/IP settings to something random (I use 192.168.0.2, sub 255.255.255.0, gtwy 192.168.1.1, dns 192.168.1.2, alt dns 192.168.1.3). Any suggestions welcome, or even verification of the behavior I've described.
    Thanks
    Michael
    Attachments:
    WriteExcelExistsTEST.vi ‏113 KB
    Row Col To Range Format.vi ‏17 KB

    Thanks for the response. I tried several different ActiveX applications like you suggested including: Microsoft Word 12.0 Objects Library Version 2.4,  Microsoft Internet Controls Version 1.1 Internet Explorer IWebBroswerApp, Microsoft Outlook 11.0 Object Library Version 9.2 Application, etc. The only one I could get to exhibit the same behavior as the Excel app was Microsoft Visio 11.0 Type Library Versionn 4.b, and thats because Visio itself opens when I run the Automation Open then Close.
    I then tried opening both Excel and Visio seperately by double clicking their link instead of using LabVIEW and ActiveX with the changed TCP/IP settings , and the same behavior was shown; occassinally it would take about 12 sec to open. So it must not be an ActiveX issue but something with Excel and Visio and my computer (since you didn't see the same behavior on yours). I guess I'll have to go searching the web for an answer...
    For completeness and to answer your questions, the environment does not have an internet connection (see first post, network created by a computer with a crossover cable to a VXI-11 instrument). Using Windows XP and Office 2003
    Michael

  • Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems

    Hi there,
    I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
    I used the information from the following example:
    http://www.ni.com/example/28934/en/
    and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
    Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
    I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
    Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
    http://www.ni.com/newsletter/51339/en/
    -> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
    I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
    Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
    To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
    Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
    And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
    I'd be thankful for any suggestions,
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    ExcelAreaScan.png ‏60 KB

    Hello everyone and thanks for the answers.
    I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
    Today I had time to take a look at the example
    Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
    It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
    I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
    Thanks for the help so far!

  • Labview crashes with Excel ActiveX

    Dear all,
    I have written a program to read and write the data in the
    excel using ActiveX sheet but crashes the Labview drastically when
    executed.
    Please go through the attached files.
    Actually the program has to sort the data in ascending order in a
    column in a
    Specified worksheet and it should write the sorted data in another
    worksheet in the same excel file itself. But while writing it should
    neglect the repeating data and should write the corresponding data in
    the other column with respect to sorted one.
    For example , In datafile.xls in sheet1 cells are like below. Let a,
    b & g are columns
    a1=0.02, b1=2.1 , g1=0.1
    a2=0.04, b2=4.2 , g2=0.3
    a3=0.05, b3=4.2 , g3=0.35
    a4=0.06, b4=4.3 , g4=0.43
    a5=0.0
    7, b5=7.1 , g5=0.43
    a6=0.08, b6=7.2 , g6=0.43
    a7=0.09, b7=7.2 , g7=0.75
    a8=0.11, b8=7.4 , g8=0.75

    I am not sure what is causing the crash. Can you give us more information? For example what does the crash say, when you relaunch LabVIEW does it comment on an error log file?
    The code you mentioned was not attached, so I was not able to try and reproduce it. I would be happy to try it here, if you can attach it.

  • Another Excel ActiveX Question

    I'm trying to save a 1D array to excel using ActiveX.
    When I write 1 value to:
    Worksheet Invoke Node -> Range/ Cell string wired to Cell 1
    Range Property Node->Value / value wired to Value
    It works great. However when I try to write a 1D array by:
    Worksheet Inoke Node -> Range/ Beginning Cell string wired to Cell1 - Ending
    Cell string wired to Cell2
    Range Property Node ->Value/ 1D array wired to Value
    What gets saved to excel is the value of the first element in the 1D array
    throughout the entire range entered.
    I'm using LabVIEW 5.1
    Where oh where am I going wrong?
    Thanks
    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----==
    Over 80,000 Newsgroups - 16 Different Servers! =-----

    Thanks,
    I am already doing that and it is slow. Wiring a 1D array is supposed to be
    nearly instantaneous.
    wrote in message news:8bnjq0$p9r$[email protected]..
    > I would recomend indexing the 1D array and writing the elements
    > individually to Excel.
    >
    > In article <[email protected]>,
    > "George M. Callara" wrote:
    > > I'm trying to save a 1D array to excel using ActiveX.
    > >
    > > When I write 1 value to:
    > >
    > > Worksheet Invoke Node -> Range/ Cell string wired to Cell 1
    > > Range Property Node->Value / value wired to Value
    > >
    > > It works great. However when I try to write a 1D array by:
    > >
    > > Worksheet Inoke Node -> Range/ Beginning Cell string wired to Cell1 -
    > Ending
    > > Cell string wired to
    Cell2
    > > Range Property Node ->Value/ 1D array wired to Value
    > >
    > > What gets saved to excel is the value of the first element in the 1D
    > array
    > > throughout the entire range entered.
    > >
    > > I'm using LabVIEW 5.1
    > >
    > > Where oh where am I going wrong?
    > >
    > > Thanks
    > >
    > > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    > > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    > > -----== Over 80,000 Newsgroups - 16 Different Servers! =-----
    > >
    >
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.
    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 80,000 Newsgroups - 16 Different Servers! =-----

  • Essbase/Excel API Developer Available

    Hello,My name is Bill Handelman and I am available for any permanent positions in the Chicago area or contract opportunities anywhere in the US.Since the mid 90's I have been doing data reporting/business intelligence development with Essbase, Excel and Access VBA, Essbase APIs, Esscmd, Business Objects, Analysis Services, and Proclarity. I have extensive experience working with users to determine their reporting needs, and experience doing the development work. You can contact me as follows:Bill Handelman847-989-1758 (cell)847-470-9851 (home)[email protected]

    OK, just a follow-up:
    Given the following code from the QueryData.java sample:
    // NOTE: Change the following variables to suit your setup.
    private static String s_userName = "user1";
    private static String s_password = "Pwd123";
    private static String s_provider = "Embedded"; // Default
    private static String s_analyticSvrName = "houhype028";
    private static String s_appName = "Mgt_Rpt";
    private static String s_cubeName = "Mgt_Rpt";
    private static final int FAILURE_CODE = 1;
    I get the following error:
    ERROR: Cannot sign on to domain. Error initializing the ORB. com/essbase/server/framework/ManageableSession
    In Excel I have under the Essbase Connect Dialog:
    Server: Houhype028
    Username: User1
    Password: Pwd123
    Application/Database
    Mgt_Rpt Mgt_Rpt
    I am not sure this is working properly. Again I am not using any of the web services, just want to connect directly connect to Essbase.
    Any help would be appreciated.

  • How to link Excel ActiveX document?

    I would like to display the contents of an Excel workbook on the
    front panel of a VI. I have created an OLE container on the
    panel and inserted an Excel Worksheet document as the object.
    Labview has set refnum type to excel.workbook and everything
    works fine except one thing: I can't seem to find the right
    methods/properties for linking this object to an existing file
    so I can display its contents. NI's website has an example of
    how to create and populate a new document on the front panel,
    but I couldn't find and example of how to get the contents of an
    existing file into the OLE document. Is there an example, or
    does someone know how to do this? Thanks in advance for your
    help.
    * Sent from RemarQ http://www.remarq
    .com The Internet's Discussion Network *
    The fastest and easiest way to search and participate in Usenet - Free!

    I have seen this working for some folks in my company. They moved their spreadsheets into SharePoint, and changed the references to other spreadsheets from file paths to be the urls of the items in SharePoint.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • Excel-ActiveX-Maximized if I close it, I get missing reference error

    I have report which is generated  using excel(not Report genration Toolkit).... There is an option for window state.
    Well I want it open,(but the problem is if someone closes the excel file, I get errors saying no reference... and all that thing)
    Is there a way to view this way(i.e. updates while entering and does not cause problems if we close it)
    Solved!
    Go to Solution.

    Hi karthik,
    you need to program some error handling.
    When your user is able to close the excel workbook while your program is working with it, you need to check for errors. When an error like "missing reference" is popping up you need to re-open the workbook…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

Maybe you are looking for

  • 5310 can't transfer music

    Whenever I try to transfer music using PC suite it converts it and puts it in my collection folder but then as it tries to transfer it to the phone it comes up with "unknown error".Sometimes it will get half way through copying before the message app

  • My MacBookAir needs to be charged and the power cord is not lighting or charging

    My MacBook Air needs to be charged so I plugged it in as usual, but the green light on the cord is not on and it is not charging.  I have tried several plugs to no avail.  Does the charging cord wear out???

  • The curious case of the missing airplay icon

    Hello everyone, last night I noticed that the airplay icon was missing on my iPad. I didn't show up in videos, music or youtube. When I turned on my iMac I saw that the icon was also missing in iTunes. The only thing I did yesterday was to connect my

  • I am trying to decide on a HDD for off site backup

    I am trying to decide on a HDD for off site backup, should I use a bus powered drive or  brick powered?  Should I go cheaper with a powered unit or convenience of a bus powered drive.  I would clone my computer and bring it to a friends house. I woul

  • Ues of Electrical Power Suite for variable frequency test

    My customer is doing capacitor testing. He would like to measure the phase angle whiile varying the source frequency. Can the Electrical Power Suite be used for this? If not can you make a recommendation (basically for measuring power factor)?