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

Similar Messages

  • 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, 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 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 文件

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

    这个论坛没有人气吗?

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

  • Report Generation Toolkit for Microsoft Office errors when building and applicatio​n

    Has anyone seen this issue?
    My program runs fine. When I try to buil an applcation, I get the attched error.
    Attachments:
    error.png ‏98 KB

    Have a look on this page.
    https://decibel.ni.com/content/thread/5936
    CLA 2014
    CCVID 2014

  • 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

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

  • Report Generation Toolkit 1.01 and broken arrow

    Hi,
    I desperately need help because I need to build my application tomorrow morning for our production department and have trouble with the report toolkit.
    I am aware of your knowledge base entry regarding this problem. I already deinstalled and reinstalled the toolkit (version 1.0.1 for LV 6), and I checked the windows registry entries. Still, after mass-compile, the report generation toolkit VIs are not executable (broken arrow, invalid property node). I have LabVIEW 6.02, 7.0 and 7.1 on my computer and I am using the report generation toolkit version 1.0.1 with LabVIEW 6.02 and version 1.1 with LabVIEW 7.1. The application that I need to build is written in LabVIEW 6.02. What else can I do to get rid of the broken arro
    ws?
    Thanks in advance for your fast answer....
    Gabs

    Hi,
    the problem is the following: during the build error 1003 occures at ....\internal.llb\Word_New_Page.vi. Possible Reasons: LabVIEW: The VI is not executable. When I open my main VI, I see no broken arrow. When I force a mass-compile (Strg+Shift+Run button), the broken arrow appears suddenly. I can then see the following error message: Word Easy Text.vi is broken because Word Format Text.vi is broken because the Property Node Range\Style calls an invalid property. Actually, the property nodes in these VIs have NO properties and the invoke nodes NO methods.
    I know now that this is due to the fact that I need to build this application for a computer on which Word97 is running, so I installed the Report Generation Toolkit for Word97. But - on my developme
    nt computer where LabVIEW is installed Office XP is running, not Office97. If I install the Report Generation Toolkit for OfficeXP, no error occurs during the build, but the executable does not run properly on the target computer (when calling Word97).
    Question for NI: How am I supposed to build an executable using Microsoft Word Report Generation Functions if the target computer has Word97 installed but the development computer has WordXP installed???
    Please help,
    thanks,
    Gabs

  • File Dialog and Report Generation Toolkit

    Hi,
    I designed a VI for an electrometer calibration and it works quite well The only problem I have is the following:
    I used the Report Generation Toolkit to put the measurement data in an Excel file. When I run the VI I'd like a window to pop up to define the location and name of the Excel report file. If these two things are done LabVIEW should create the specified Excel file and run the rest of the code.
    So i tried this with the "File Dialog" Vi and all the needed low-level File I/O VIs and it worked.
    But when i connect the "File Dialog" VI with the "New Report" VI of the Report Generation Toolkit I get an error message.
    Is there any solution to get this file dialog pop up window with the Report Generation VIs?
    thx for any help...!
    Message Edited by Flea on 12-15-2005 03:58 AM

    Wow, thanks for your fast and very helpful reply devchander!
    I already tried this and it works fine
    thx!

  • LabVIEW VI with Report Generation Toolkit elements in a TestStand sequence does not run with a LabVIEW 8.5 Run-Time Engine

    Hi all,
    I am using LabVIEW 8.5.1 and TestStand 4.1. I have done a TestStand sequence with a VI in it, which uses Report Generation Toolkit elements. On my machine I am using LabVIEW and TestStand with a Development System license. On the other machine I am using TestStand with a Base Deployment license and I have chosen the LabVIEW 8.5 Run-Time Engine in the Adapter Configuration. Everything is running well except of this VI with Report Generation Toolkit elements. The error message is showing that the VI is not executable. It works well only after I have installed LabVIEW with an Evaluation license and chosen LabVIEW 8.5 Development System in the Adapter Configuration.
    I have found other posts and a document in the KnowledgeBase with a similar problem: http://digital.ni.com/public.nsf/allkb/8A0E6274D9B​D7B1986256F62006AD402?OpenDocument But I am not using EXE files in my sequence, so I don't know how to solve mine. Anybody has an idea?
    Solved!
    Go to Solution.

    Hello guys,
    thank you very much for your answers!
    @Ruediger:
    I tried to follow the instruction for Method 2 in the mentioned document: http://digital.ni.com/public.nsf/allkb/F3DC40A6E3F​3B25B862570AD005D1D3D?OpenDocument, but the steps on my machine are different starting from step 4. After I click "Continue..." in step 3, I dont get a window, the system just makes a new folder with the same VI. 
    To be honest, I am new to LabVIEW and have some difficulties at this time. What I understood from your reply is, that I need to make a LLB-File, where the files from Report Generation Toolkit are in!?
    @GovBob:
    I was following the instruction in the document: http://digital.ni.com/public.nsf/allkb/9E00E7EFE06​35E678625734600779EFE, but it wasnt working. Can you please tell me how I can check if the VI Server is installed and running on the machine?
    I am using LabVIEW 8.5.1 and TestStand 4.1 on my machine, on the deploy machine there is TestStand 4.1.1. The version of my Report Generation Toolkit is 1.1.2.
    Kind regards, Roman

  • 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

  • Report Generation Toolkit producing error -2147417842, "The application called an interface that was marshalled for a different thread."

    Hi everybody,
    I've got an application that logs data to an Excel spreadsheet using the Report Generation Toolkit.  My VI's have worked fine in the past using Excel XP, but since I've upgraded to Excel 2007, I am getting COM errors like this one:
    "Error -2147417842 occurred at The application called an interface that was marshalled for a different thread. in Excel_Insert_Text.vi"  That is the exact wording, even with the weird punctuation and capitalization.
    The first occurrence of the error is not determinate.  Sometimes, up to 10 logging sessions, involving a new .xls file, can occur before this error pops up.  Once this error occurs, I must quit LabVIEW to resolve it.  If I try to do anything with Excel, I always get this error, although sometimes it comes out of different source VIs.  Excel_Open.vi is another.
    These logging VIs have worked just fine until upgrading to Excel 2007.  I checked, and I was using a really old version of the Report Generation Toolkit, v1.0.1.  I read the documentation and had a big sigh of relief when I realized I needed to upgraded to v1.1.2 to get Excel 2007 support.  However, even after upgrading, I'm still getting the same errors.  I'm using LabVIEW 8.0.1, and I'm also building these VIs into an application.   The error occurs both in the LabVIEW IDE and in the built application.  Does anybody out there have any idea what I can do to fix this?  I googled a little, and discovered this is a COM error, but I can't find any references to the Report Generation Toolkit specifically.
    Thanks,
    Phil
    Solved!
    Go to Solution.

    Hi Christian,
    I do not see that exact option listed, do you mean "user interface"?  I recognize the "Run in UI Thread" option, it's on the Call Library Function Node.
    I checked, and my top-level VI has "same as caller" set, and I believe all my VIs are set to "same as caller".  Are you suggesting I change my top-level VI preferred execution environment to "user interface", or just the logging sub-VIs that use the Report Generation Toolkit?
    Thanks,
    Phil
    Attachments:
    VI_properties.png ‏15 KB

Maybe you are looking for

  • Export layers to files

    This question was posted in response to the following article: http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7760a.h tml

  • Issues while archiving Invoice documents

    Hi all, While archiving Invoice documents using MM_REBEL(using company code only), it was found that the write job is picking up certain open Invoices also. ie the subsequent Accounting document was not cleared/archived. My understanding was the syst

  • How to decide if an iCal event will send out an email to invitees?

    Looks like iCal Reply Checker doesn't work anymore in the latest iCloud update of Lion (10.7.2)? Is there any way to add someone as an invitee, but not actually send them a calendar invite?

  • Oracle VM and OVF

    Hello, use Oracle VM the OVF or can I import VM's with this format? regards ChriZ

  • Event from message

    Is it possible to make an event in iCal from a message from Mail.app ?