Report Generation Toolkit 打开现有的Excel 文件

用activeX打开excel我会,但是属性太复杂。不想用ActiveX的方式。
我有LabVIEW Report Generation Toolkit for Microsoft Office;
里面的例子都是生成新的excel 文件
如果要打开现有的excel文件,然后对里面的资料进行操作,可以透过这个toolkit实现吗?

这个论坛没有人气吗?

Similar Messages

  • Report generation toolkit excel, decimal?

    Hello!
    I have problem with the report generation toolkit excel!
    I only gets 3 decimals in excel?
    Ex. In labview = 0.0458943 when i send it to excel = 0.046.
    I use Excel easy table.vi to transfer my array, should I use someting else?
    Ive already tryid to increase the decimal in excel but i doesent work.
    Labview 8.6
    Report generation toolkit ev 113 

    Johan1300,
    It sounds like you are writing a 2-D Array of doubles to excel.  The Excel Easy Table.vi converts numerics to strings before writing data to excel.  It is written to always use 3 decimal places.  You need to convert your 2-D array of doubles to strings before writing the info to excel.  Here are a couple of ways to make the conversion.  The top method is based on how the Excel Easy Table.vi makes the conversion.  Note that in both examples the format string constant sets the number of decimal places to 8.
    Message Edited by Wayne.C on 04-08-2009 09:12 AM
    Attachments:
    2D Doubles to 2D String.png ‏6 KB

  • Report Generation Toolkit Excel errors and Libraries, Classes

    Hello All,
    I'm using the Report Generation toolkit Excel functions to handle some data and create graphs.  I'm running into problems with the Add Worksheet.vi.  At the very start of the vi, it closes the reference to Shapes.  Occasionally, the Close Ref will throw an error.  I haven't pinned down the exact cause yet (probably an invalid reference).  The error itself wouldn't be a problem.  Under other circumstances I would choose to ignore it and continue on.  The problem is, this is stored in a Class Library controlled by NI.
    Solutions I've tried without success:
    1.) Make changes, and save the new vi with another name - can't do it because it's encapsulated and the Library is password protected.
    2.) Install toolkit in something other than the default folder, so I can make changes and put it under Source Control - installer doesn't allow a new path to be entered.
    3.) Change the vi where it is.  This works until I move the source to another computer or I update Labview.  At that point I lose all my changes.
    Maybe it's just my inexperience with Classes, but I just don't see an elegant solution to this.  Ultimately I'd like to copy the library off to somewhere else and put it under Source Control so I can make changes and additions to it (NI folks - providing a password to unlock the lib would be helpful...).  Does anyone have suggestions on how I can accomplish this?
    Thanks in Advance,
    Doug

    Hi Ben,
    Sorry about the first post.  After re-reading it, it sounds more like a frustrated rant than a request for help.
    I've attached a simplified vi to try to illustrate the problem I'm having.  I'm running Excel 2007.  Please open the vi, then open Excel Add Worksheet.vi.  At the start of the vi, Close Ref for Excel.Shapes occasionally throws an error.  So far, I have not been able to consistently reproduce the error, so I can't really troubleshoot it.  As I recall, the error code is 1045.  The error is carried through the rest of the vi, causing invalid references to be written to Excel._Worksheet and Excel.Shapes, going out to NI_report.ctl.
    So, here are the issues I'm running into (other than the error itself):
    1.)Short of closing and reopening the file, there is no way to recover from the error.  After the error, there is an invalid reference in Excel._Worksheet.  There is no vi available to regenerate references in NI_report.ctl.  I could easily write a vi to start from Excel._Application and re-read them, but because NI_report.ctl is in a Class library (controlled and passworded by NI), I can't add the vi to the library.
    2.) I found that I could ignore the error by wiring around it.  If I disconnect Error Out from Excel.Shapes Close Ref and wire Error In from Excel.Sheets.Count to the Error In of the Close Ref, everything works fine.  Under other circumstances, I'd save this with a new vi name (because functionality changed) and continue on.  But, because the vi is part of a Class library (controlled and passworded by NI), I can't do this.  I can save the vi with the modifications (because Excel Add Worksheet.vi is not passworded), but if I pass the source off to someone else, they will have to make the same changes on their installation of the NI Report Generation Toolkit.
    Again, I can't reproduce the error with any regularity.  I've run the example vi I provided a few times and everything seems to work fine.  If I come up with something, I'll repost.  If you (or anyone) has an idea of what could be failing or if they've seen the problem, I'd appreciate a comment.
    Thanks again,
    Doug
    Attachments:
    Excel Fail.vi ‏15 KB

  • Report Generation Toolkit Excel Vi's do not run after creating an executable​. What am I missing?

    I have labview 8.5 and Report Generation Toolkit version 1.1.2.   My vi works fine during development. When I make an executable or an installer the excel vi's do not work. I have seen this question posted before but it has always been for earlier revisions and the answers do not seem to apply with 8.5 and 1.1.2. 

    Hello ajh,
    You will have to include Dynamic VIs in the executable you build. The following link has more information:
    http://digital.ni.com/public.nsf/allkb/C38CE3F3054​2D65B86256F0E00740DD8
    Prashant.

  • Report generation Toolkit: Excel report functions error -2146827284

    Hi,
    I'm trying to create an automated report using excel functions from the report generation toolkit in labVIEW. When I run the program that generates the report first time round (the report consists of several worksheets, each worksheet is added onto the report at a diffferent state in a state machine) it always works fine and no error is generated. However, when I run the program again it will infrequently (sometimes it does, other times it will not) generate the undefined error -2146827284, this is coming from one of the excel report functions and it cannot find it on highlight execution mode.
    Does anyone know anything about this error, why it occurs, how to prevent it?
    I would appreciate any help.
    Thanks,
    Rowan

    mebels_cti wrote:
    Found something that helped; https://forums.ni.com/t5/LabVIEW/Error-code-quot-2146827284-quot-when-trying-to-open-an-Excel/m-p/20...
    Excel still open
    So I added this;
    You should use the Application Quit method instead of killing the task. I doubt this is the cause of your issue.
    Ben64

  • Report Generation Toolkit - Excel Templates

    Hi,  I've created an Excel Template with a single formatted
    worksheet.  I need to generate a report with a varying number of
    worksheets but all based on the same template.  I tried it using
    the ADD WORKSHEET vi but this just adds an unformatted worksheet. 
    How can I use the template's worksheet format for each worksheet that
    gets added?
    Thanks,
    Charlie

    Hey Guys,
      I know this post if kind of old but I hope maybe one of you can help me out.  I'm using an invoke node similar to what is above to print out an Excel spreadsheet to the default printer.  My issue is that when I try to print from the spreadsheet from the executable, the executable crashes.  I know it is that invoke node. The reason why I say that is because until recently I had two development computers, one running on Windows 7 LabVIEW 2010, and one running on Windows XP LabVIEW2010.  The original .exe was built with the XP machine, when I tried to make some changes with the Windows 7 machine and open the project it would say that there was a missing connection to the invoke node even though I did not touch that part of the application. I would then remove the invoke node, add it again and it would clear the error for whatever reason. I would then build the .exe with the Windows 7 machine and when it would run, the application would crash at the point where it goes to print the spreadsheet.  I got around this by building the .exe with the Windows XP machine, and it worked fine without any issues. However, my Windows XP machine cra**ed out so i'm no longer able to build the .exe on the XP machine .  I needed to make some changes to the .exe not anything involving this section of the code and for whatever reason when the application goes to print it crashes.  I get some criptic crash report from Windows that is pretty much useless.  I think its a Windows thing. This was workign correctly though until I did a build on the Windows 7 machine.
    Attachments:
    Printout Invoke Node Excel.png ‏70 KB
    crash1.png ‏22 KB
    crash2.png ‏23 KB

  • Need help with Report Generation Toolkit: Excel Set Cell Format.vi

    Hi people,
    I've been searching and found this old thread of someone asking what is the input parameter "Number format". And I dont know what should I put in there. I've tried so many possibilities, but nothing works so far, such as:
    0,0
    0,?
    0,#
    #,0
    ?,0
    and also with @, doesnt works. Where would I find help about this parameter?
    I'm using Excel2003, german version, thus local decimal separator is a comma.
    I also found this help from NI, but seems doesnt help me either. Do I miss something important?
    thanks,
    Yan. 

    Hi,
    I've used your suggestion and some numbers in excel doesnt need to get "right click, change to numbers" anymore (green indicators on the left-top side in some cells are gone). But, I think its still not a number, because I cant use a simple formula, such as in cell A10 I type "= A1/2" (cell A10 equals cell A1 divided with 2) . I got error which says its not a number.
    Well, but other thing is found, any format-string I put in the input of Excel Set Cell Format.vi, such as #,########, will be shown the same as "customize #,########" if I right click in a cell in excel and click "Zellen formatieren" (formatting cell). But however, the numbers are still depends on the input of the format I put in the Append Table to Report.vi.
    regards,
    Yan.

  • Problem for Report Generation Toolkit for excel 2000

    Hi all,
    Now I am Developing my program with Report Generation Toolkit 1.1.0 and Labview 7.1.
    In my computer I am using Excel XP, and there is not any problem. But when I build to
    a exe file, and use in a computer with Excel 2000, it didn't work.
    And I try to check the source file in this computer, I found that there any some connection
    error. And this is caused by the active X class. As I know Excel 2000 is using Microsoft Excel
    Object Library 9.0, but i cannot find it in the list of active x. So it is using Microsoft Excel Object
    Library with a very old verison. So in the property node there are missing functions, such as the
    UsedRange in _Worksheet in the Excel_Get_Range.vi. However, In VBA, I can find the 9.0 Library.
    Is it the problem of 9.0 library? How can I solve the problem? How can I upgrade the library to 10.0?
    Thanks.
    Regard,
    Ryan

    Hi Mike,
    Since my program is for all the staff in office, everyone may use it.
    I cannot call the whole office to upgrade the excel to XP.
    And I think Report Generation Toolkit is alway support Excel 2000,
    since the old version of it is not support for Excel XP.
    Regard,
    Ryan

  • Report Generation Toolkit with Excel 2003 and Excel 2000

    Hello,
    I'm using the Report Generation Toolkit to generate an Excel report from an Excel template.
    The "NI_Excel.lvclass" is included in the "source" section of the application builder options.
    I create an exe file on  a PC where Excel 2003 is installed. On a Notebook, where only Excel 2000 is installed, the application crashes at the generation of the report:
    I guess the problem is the different version of Excel but I don't know. On the developer PC with Excel 2003 it works fine.
    In this document it's only talked about different Word versions.
    How can I use the Report Generation Toolkit here?
    I'm using it that way:
    Regards

    Oh, it seems that the Report Generation Toolkit "only" supports Excel XP/2003/2007.
    I think, that's the problem.

  • REPORT GENERATION TOOLKIT AND EXCEL

    i have a problem with report generation toolkit and excel
    the problem is:
    i must read & write from a excel worksheet when this is open but when i using the report generation the worksheet is open another time
    have some solution for this problem?
    sorry for my english

    You need to close Exel when before your VI is running. Excel can not have two instances running at the same time.
    Joe

  • I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 profession​al. The create new report VI opens Excel but throws error (-21471672​62- from automation open VI) when I try to open MS word. please help...

    I am using report generation toolkit 1.1 with Labview 7.0 and Office 2003 professional. The create new report VI opens Excel but throws error (-2147167262- from automation open VI) when I try to open MS word. please help...

    Hi Leo22,
    Does this error occur if you use any of the example programs that come shipped with LabVIEW? I would try opening one of the examples that write data to Word and see if those give you an error. Also, have you tried just putting down a New Report.VI and change the report type to Word? If this simple vi (that's all you need to open Word) breaks, I would check to see if there are any instances of Word still open. Check the task manager to see if any word processes are still open. There should not be a problem accessing Word 2003 from LabVIEW 7.0. If neither of these solutions work, please give some more detail about your application and we can research further. Thanks!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Excel value range with Report Generation Toolkit

    I have an excel sheet.  I want to find out the range for cells with values.  At least, I want the find out what's the last row that has values in it.  I tried "Excel Get Last Row.vi" in the report generation toolkit, but it would treat a blank cell as a valued cell if it is filled with another color.  Therefore, that won't work. 
    I don't want to use active x, and I don't want to write a separate vi to search for the last row.  I want to see is there a way to use the report generation toolkit.  Can I somehow get a hidden method from the class?  I would think that, since they are charging for the report generation toolkit, a simple function like that should be included.  Thanks!
    Kudos and Accepted as Solution are welcome!

    I am pretty sure that the Report Generation Toolkit does use ActiveX, so you are using it even if you dont want to.
    Seems to be how the UsedRange function is being used in the toolkit.
    See here for some examples: http://blog.contextures.com/archives/2012/03/01/select-actual-used-range-in-excel-sheet/
    I tried, and it does not find the blank cells with colored backgrounds.
    This will require some activeX modifications though.
    Kenny

  • Report generation toolkit: Get all excel worksheets

    Hej everybody,
    how can I get a list (name and number) of all worksheets in an Excelfile using the report generation toolkit and Labview 8.2?
    Thanks for answers,
    Christoph

    Hi,
    I made the similar application using excel dll in LabVIEW 7.1 
    Try this...
    Regards
    DC
    Attachments:
    Excel_Worksheets.vi ‏48 KB

  • Problem writing to excel file using report generation toolkit

    hello everyone, i have this report generation toolkit... and i want to output DAQmx Analog I/P data on to an excel sheet. the DAQmx is programmed to collect 
    data at 3samples/sec. however, when i see the excel file that Report Generation Toolkit generates, the time stamp is updated every second instead of every 0.33sec. 
    can anyone please help me?  i am using the MS Office Report Express VI. 
    Now on LabVIEW 10.0 on Win7

    @All, I got rid of the express VI, decided to work on the custom low level VIs instead. however, i have a new problem now... 
    I have a case statement wherein, the user selects if he wants to start generating a report. once the program enters tat loop, the program speed reduces! 
    can anyone please tell me why is it happening? i ahve attached the vi... also another question.. in this VI, i am capturing the unwanted data into the graph as I am indexin the graph input. how can i make a logic 
    that the graph captures the data only when I am switching the CREATE REPORT button (which is in the while loop). is there a way that I can append the data to the graph without creating a new graph every iteration? please let me know
    thanks
    Now on LabVIEW 10.0 on Win7
    Attachments:
    Untitled 7.vi ‏75 KB
    Untitled 7.JPG ‏99 KB

  • Report Generation Toolkit, Print Excel Report, LabVIEW Crash

    Hello,
    when printing a report generated with the report generation toolkit for excel my build application crashes on our customers PC.
    When I run this application on my PC it works fine.
    The problem is the active X invoke node that trys to print the report but i cant get any error messages to find out where to locate the problem.
    Maybe that there is a problem with the active X node or the Excel Version on the customers PC?
    I use LabVIEW 2010 and Excel 2007 the customer has Excel 2003 SP 3.
    I changed the report to generate it in Word where the Print_Report.vi fine on both PCs. But in Word Report there is called another active X invoke node to print the Report. So it seems for me that there really is a problem with the Print in Excel active X invoke node.
    Mybe someon can help me in finding out whats the problem.
    Greetings Daniel.
    Solved!
    Go to Solution.

    Hi Daniel,
    your behavior has been reported by others. For example:
    Application Build Failure on Excel.Print Report call
    http://forums.ni.com/t5/LabVIEW/Application-Build-Failure-on-Excel-Print-Report-call/m-p/1563242
    Problem posted: 05-17-2011 02:19 PM
    Workaround posted: 06-01-2011 and later
    So their workaround was to use Excel 2007 or 2010 instead of 2003. Is this working for your customer?
    Best Regards,
    Jan

Maybe you are looking for