Showing results for 
Search instead for 
Did you mean: 

Error 2147023170 occurred at Remote procedure call failed at Excel copy


I'm using a downloaded excel vi library (including, and to programmatically insert my data into a template worksheet inside an excel workbook. However, I keep getting "Error 2147023170 - Remote Procedure Call Failed" from LabVIEW, followed by a tremendous series of dialog boxes generated by Microsoft office before I end Excel in task manager.

I'm confused by the source of this error. There were times when this error only occurred when I had other excel workbooks open while running the program. There were also times when it occurred for no reason. And sometimes it works just fine...

Is there a consistent reason why this happens so that I could avoid in the future, such as some settings in excel or location of the file? Or has this something to do with my downloaded library (I can't remember exactly where I downloaded it, possibly from the discussion forum)?

Relevant code attached.

Thanks for your help in advance.

Download All
0 Kudos
Message 1 of 6



I have been unable to open and use the .VIs posted due to missing files. There is no library that holds the global variables so I am unable to run the vi. Is it possible to upload your project?


Have you got a screenshot of the error message that you receive?

In which VI does the error occur?


If you can find where you "downloaded it, possibly from the discussion forum" this will be helpful to future troubleshooting.






0 Kudos
Message 2 of 6

Hi Filip, the report generation toolkit handles a lot of the functionality you will need to create Excel workbooks. I believe it started coming included with LabVIEW in 2012 or so.

0 Kudos
Message 3 of 6

@Gregory wrote:

Hi Filip, the report generation toolkit handles a lot of the functionality you will need to create Excel workbooks. I believe it started coming included with LabVIEW in 2012 or so.

The Report Generation Toolkit is included with the Professionnal version, it is still an add-on you have to buy for the basic and full versions.



0 Kudos
Message 4 of 6

Hi Amy,


Sorry for the late reply. I've uploaded the project which is tailored in a way that only the parts relevant to excel generation remain. Ignore the VIs I uploaded last time.


In order to see the outcome of the program:


1.Create an excel workbook. Rename a worksheet "Template New" which is to be used as a template.

2.Open Enter Excel workbook Path and New Sheet Name/Existing Sheet Name. ( Enter New Sheet Name to create a new report with the name specified; Enter Existing Sheet Name to modify an existing report.Other inputs are just data to be fed into the report. Could leave them empty.)

3.Run Wait for the Excel report to be generated and show itself.


Other information I have is :

1. The error message is usually as the name of the question under the title of "undefined error". Sometimes 

2. As I said, sometimes it generates tons of error messages by Microsoft Excel after this error message by labVIEW.

3. Every time I open one of the VIs in the excel library and close it without any change, there is a dialog box saying “ has unsaved changes, do you want to save them..."


If you have any idea what caused the problem that would be really helpful.

Thank you in advance!



0 Kudos
Message 5 of 6

Thanks for the reply.

I've already used the toolkit as part of my code, but only to find some of my desired functionalities could not be achieved with the toolkit alone. So that I added something else from the downloaded excel library.

I've uploaded the relevant part of my project so that the result could be seen. 


0 Kudos
Message 6 of 6