Excel operation using activex

I am trying to use activex with labview to copy a specific worksheet from a multi-sheet excel file to another spreadsheet file. How can I do this? Any example vi? All my example files are about making a copy within the same file.
Yin

Yin,
You can use the VI from the following web site
Writing Rows to Excel 97 and Excel 2000 Using ActiveX
The VI allows you to write to a specific worksheet. You can use some of the SubVIs provided to first get a reference to the worksheet in the first workbook, for example SelectSheet and OpenSheet VIs.
Or you can look into LabVIEW shipping examples on Excel, Write Table to XL VI, which also allows you to open specific Worksheet.
Some good examples on how to read from Excel using Activex are located on these web sites:
Reading Values from Microsoft Excel 97, Excel 2000, or Excel XP Worksheets
Write and Read to an Excel 2000 Spreadsheet via ActiveX
Zvezdana S.
National Instruments

Similar Messages

  • How can I add excel pictures using activex

    I would like to be able to use activex to insert an image into an excel spreadsheet. I know how to read and write data, but the chart feature is too cunmbersome and when I updated excel to 2007 most of the calls stopped working. I see that there is a pictures property/method that lets me specify an image file, but I don't know which property/method(s) to call it from.

    2007 does take more time to draw the data on the chart. I am not having any problems with errors on the active X for 2007. I is much slower than 2003 I would agree. My IT group moved us to 2007 so I am stuck with it no matter how slow it is. I am trying to figure out how to get the help file back. I had these in 2003 myself. I know it has nothing to do with LabVIEW. It is an add in or some switch that you need to throw in excel to allow for this connection.
    Tim
    Johnson Controls
    Holland Michigan

  • IO operations using ActiveX with Windows 8 64bit and IE 11 not working

    We are using ActiveX for downloading file from the server, It works well with Windows 7 and XP but there is issue with Windows 8 and IE 11.It doesn't give any error for downloading files using ActiveX but file not downloaded and even does not generate log
    file for the issues and error.
    We are confused because it doesn't throw any error while log generation or downloading file
    Is there any limitation for ActiveX with Windows 8 for IO operations.
    We are stuck at this point. please help
    Thanks

    Hi,
    check Tools>Manage Addons>Show all addons
    find your activeX control in the list, make sure it is enabled and supports both x86 and x64.
    also
    Internet Options>Security tab, click "Reset all zones to default"
    file>Properties menu to find out which IE Security zone your web page with the activeX maps to.
    Regards.
    Rob^_^

  • Error code "-21468272​84" when trying to open an Excel workbook using ActiveX

    Hi all,
    i have a problem using ActiveX to open excel files. I get error code "-2146827284" (unknown error) when trying to open a workbook. This problem occurs on only one machine i work with, on the others it works fine. All machines have the same setup, Excel97 and Excel2007 installed on them.
    Any ideas??
    Thanks
    Solved!
    Go to Solution.
    Attachments:
    ExcelToolkit open.PNG ‏53 KB
    ExcelToolkit open FP.PNG ‏32 KB

    andyforpresident wrote:
    For sure the file is there, the _application object gets created without an error.
    Creation of the application object has nothing to do with opening the workbook, which is what is generating the error. If you are getting an error with opening the workbook then you either have the wrong path, a permissions issue, a network issue, or the file is already open.

  • How to change series or line color in excel 2007 using ActiveX

    I am trying to change series color using Excel 2007 with ActiveX as below. It seems the color cannot be controlled correctly. For example, if I chosse red color, my curve will be changed to blue. Any ideas?
    Also, I googled and found a guy ran into similiar problem using VBA for Excel 2007. See the link below:
    http://help.wugnet.com/office/change-series-line-color-excel-2007-vba-ftopict1062646.html
    Set ch = Worksheets("Chart").ChartObjects(1)
    Set objSeries = ch.Chart.SeriesCollection(1)
    objSeries.Format.Line.ForeColor.RGB = RGB(255, 127, 0)
    According to the post, it need to be done as follows
    objSeries.Border.Color = RGB(255, 127, 0) . But I cannot find the border property/method in ActiveX.
    The color seems to be abitrary. and I found the 

    Xubuli,
    I looked into your question and confirmed that Border.Color is not located under the Excel.Series library. Instead, you must locate it under _Worksheet.UsedRange as seen below in the figure. I am attaching the VI file where I located the the Border.Color property node, and I am also including a SubVI on the block diagram that goes into explicitly set the cell color and border. This SubVI can be found under Programming>>Report Generation>>Excel Specific>>Excel Format>>Excel Set Cell Color and Border.vi, if you have the Report Generation Toolkit installed. I hope this helps.
    Larry H
    Applications Engineer
    National Instruments
    Attachments:
    CellBorder.vi ‏8 KB

  • Filter excel data using activex

    Hi,
    I have imported some datas to excel using labview, and using activex I can able to apply filter also. Attached screenshot is sample excel data. In that, I want column 3 to filter only 500 and then 100 and so on. Is it possible in activex. Because  after filtering 500 I want to find least value for athoer columns 1st and put it in another sheet, then filter 100-->find least value-->put it in another sheet. So what I want now is to filter 500 alone in column 3 using activex. thanks in advance
    Thanks & Regards
    saamy 
    Attachments:
    screenshot-excel.jpg ‏114 KB

    If any1 know this.. please let me know..thanks in advance

  • Ever get error code "-2146827284" when trying to open an Excel workbook using ActiveX

    The error message claims that the file cannot be found, but the file is clearly there. Ever seen this?
    Strangely, this happens on one machine, but not on another. I'm suspecting some kind of ActiveX incompatibility and would love suggestions on how to track this bugger down (I submitted to support also).
    Thanks
    Brad
    The attached vi exhibits this behavior (on one machine anyway)...
    Attachments:
    footest.vi ‏30 KB

    Brad,
    My suggestion is that if you know exactly where does your Excel ActiveX Library resides, please look for it and re-register it in windows, using the regsvr32 command. If not, please check wether the Excel version of the machine that is having problems is the same version as the machine where it is actually working. Last resource you may want to try to reinstall Excel after trying some of the Excel examples that came with LabVIEW. If you feel that you need more direct assistance please contact us directly, you may wish to call us or email us and you can find the information for doing so at www.ni.com/ask in the internet.
    Good luck!
    Nestor Sanchez
    Applications Engineer
    National Instruments
    Nestor
    National Instruments

  • Facing problem in writing data to excel sheet using ActiveX

    Hi.
    I want to write data from a one dimesional array to a particular excel sheet in a particular row.Please see the attached vi for explantion.
    It is giving error.But If I give a new file name when the appliation is getting closed it is writing data to the new excel file.
    Please help.
    Thanks in advance
    Attachments:
    Excel sheetWrite.vi ‏90 KB

    Thanks Jhoskin and Rudi .......
    I am able to write data to excel sheet now. I am attaching one"test.zip" file that contains a VI named "Squence.vi "that contains another subVI named "Write U94006 Table To XL.vi"which does the functionality of counting the number of rows in the excel sheet and writing data in the next blank row. I am using the same subVI in the VI named "Sequence.vi"two times so it is taking a lot of time in opening and closing the excel sheet. Will you please suggest some way of calling the subVI only one time.
    Rikki
    Attachments:
    Test.zip ‏105 KB

  • How to write to a password protected excel sheet using ActiveX?

    Hi all,
    I would like to write to a protected Excel sheet. I protect the sheet just in case the data is not wrongly programmatically saved to other cells. These cells contained formulas.
    Please help.
    Thanks,
    keng

    Hi Randy,
    Thank you for looking into my problem.
    I have looked into the Workbook.open property node. There is "password" on the property node. Please see attached diagrams.
    Is is the right way to do it?
    Please advise further.
    For your information, the Excel workbook and sheet 1 are password protected.
    Thanks,
    keng
    Attachments:
    Password_Excel.jpg ‏37 KB
    Password_Sheet.jpg ‏23 KB

  • 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

  • Efficiency of using activeX for Excel

    I've been using data logging for our test fixtures in .tsv files, but our engineers want to automate it further by organizing some new data into several sheets, so I'm looking into manipulating Excel directly using ActiveX.
    My question is how efficient is it to write this in ActiveX compared to just making a text file? I'm concerned that, since we're going to be writing some 50000 cells or something, that it'll suck up a lot of memory to do it through ActiveX. 
    Is this a legitimate concern, or am I just being paranoid?
    Anything worth doing is worth over-doing.
    LabVIEW Junkie

    Thanks for all the help, guys! 
    A couple of things -- first off, I'd love to look at that code if you get a chance. But what I'm concerned about is if I create an array of 50000 values or something like that and write it all in one go at the end of the program, two things are going to happen: 1) it's going to take a really long time to finish the program, and 2) if the program crashes in that final step, I'll lose all the data. That second reason is why I currently write a line every cycle to the .tsv file. 
    What I'm thinking of doing, is meeting you halfway -- rather than write each cell individually, write each line individually within the spreadsheet. This should reduce the memory used (hopefully) and increase performance.
    I haven't really played around with TDMS yet, I'll look into it. A couple questions on that -- does it write in excel format? The reason I ask is the second sheet that I'm supposed to add is not going to contain any changing data -- it's just to store some constants that are set on the front panel. If TDMS stores data in excel format, I can write it to TDMS, transfer to Excel, and then use ActiveX to add the second worksheet with the constants at the end of the program. How's that sound?
    Thanks again!
    Anything worth doing is worth over-doing.
    LabVIEW Junkie

  • Generate Excel File using Java

    Hi,
    could any one tell me how can I create an Excel file using java. I can create the file using PrintWriter and other IO classes. But how do I insert the data in to different cells and rows.
    Any help would be greatly appreciated. Thanks in advance for your help,
    -MS

    Dear All,
    There are three ways for achiving excel operations using java including excel to xml etc.
    1. There is a very effective tool available for this operation is "jexcel". You can find it at http://www.andykhan.com/jexcelapi/index.html
    2. Jakarta site has provided a very good tool by name jakarta poifs. one can find at jakarta site.
    3. One can develop a very effective tool by combining these above tools togather.
    The operations that can be performed are read, write, convert etc for excel. The major attraction of Jexcel is excel to xml conversion.
    Regards,
    Nishant Kulkarni
    Software Engineer
    [email protected]

  • How to use ActiveX to open/write to Excel template but not to overwrite it

    Hi there again (it's me...if anyone recognised me...)
    I managed to use ActiveX to open Excel and make it visible onto the screen. But I would like to know how can I make Excel open an Excel template and let me write data to the cells without overwriting the original template. I did try to use another program source such as the EXCEL TOOLKIT but I can't still figure out how does it work for my case. Is there a simpler example for me to refer too? Please help.
    Thank you,
    juni

    Hi Mike..
    I have tried to use the examples provided LabView 6.0. I don't understand how to use the Range value to get the data from my global array and also how to open the template and write data to it.
    At the moment, I could only open a saved dialog box and a default string filename is used to save my data into a new Excel but not the formatted excel which I want.
    If possible, please help again. Vi attached.
    Attachments:
    savefile.vi ‏109 KB
    datarecords.vi ‏12 KB

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

  • Using vlookup btwn worksheets when using ActiveX Excel

    I am having problems using the vlookup function in Excel.  It works fine if I have the lookup table on the same worksheet that's already open in LabVIEW.  I first open an excel file that I use as a template.  I copy the header and formula information from that file into an activeX container containing an Excel worksheet.  I then allow the analyst to enter data into the ActiveX Excel spreadsheet.  Meanwhile, I create a log template by creating a text file with headers.  When the analyst is done entering data on the front panel, they click on the Update/Print Label button.  This appends their data (a range of cells) to the text file (which is then formatted and saved using report generation tools) and it's printed to a label.  The problem is on the front panel ActiveX Excel sheet.  The original excel sheet used as a template has many formulas, all of which work well in Excel, as well as in the LabVIEW app, with one notable exception.  One of the cells contains a formula that uses a vlookup function.    The problem is when I place that lookup table on a different worksheet.  It works great if I place the lookup table on the same sheet as the template, but when I try to reference a different sheet, I get an error.  I'm assuming that I just need to add code to open the second Excel spreadsheet (or better yet - a separate workBOOK).  I was confused at first, because the vlookup function worked fine in Excel, but not in LabVIEW.  Then I realized that Excel already had all the worksheets in the workbook open, but LabVIEW does not.  Am I correct?  If I want to use a vlookup to look on another worksheet or another workbook, do I just have to open that second workbook/sheet in LabVIEW?

    Hi Dan,
    You are right.  LabVIEW does not have the other worksheets open.  I think that you are on the right track.  I recommend opening another worksheet and testing it out.  LabVIEW should stop giving you an error when you do.
    Nick Keel
    Applications Engineering
    National Instruments 
    Nick Keel
    Product Manager - NI VeriStand and Model Interface Toolkit
    National Instruments

Maybe you are looking for

  • HDD upgrade on my Satellite A100-259

    Hi, I want to upgrade my hard drive but I am unsure if its an IDE or SATA. Ive found software that gives me all laptop information and under the hard disk drive its got interface IDE SATA, so I am non the wiser the hard drive is a TOSHIBA MK6034GSX.

  • How to read the java class file to convert it in java.

    hello all, i m developing the java application which generated the java code from the java 'class file' . Can anybody please help me, Is any java support for reading the class file? or how to know the class file format? I know the application javad,

  • I cannot transfer music from my iPod to my computer.

    The hard drive on my computer crashed/  I didn't have a backup, so no big deal.   I installed iTunes and went to copy my music from my iPod back, but it won't copy.  Why not?  I've read the answers about protecting music rights and the iPod is not a

  • Cache connect to any DB

    hi, The cache connect supports only for oracle. Is this a strategic limitation or the cache connect to any db is in the development queue? Coz we find we loose many deals since timesten can't coexist with databases other than oracle. (Its true that t

  • SUDDENLY ID CS5 crashes when I export to PDF...

    SUDDENLY ID CS5 crashes when I export to PDF...anybody have this experience plus a solution?