LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Merge Cells.vi throws an undefined error in Excel 2013?

Basically, I can't write text into an Excel spreadshoot using the Report Generation tools.

 

Using LabVIEW 2013 (SP1) I am writing to individual cells in an Excel (2013) template.

 

The error is coming from the Report Generation Toolkit>Excel Specific>Excel Easy Text.vi.>Excel Merge Cells.vi.

 

Inside of the "Excel Merge Cells.vi" is an "Invoke Node.Range". When the program hits this point, it throws out an undefined error.

 

My code has been running on multiple platforms in multiple programs with no problems using Office 2010.

 

NASA upgraded our Office Suit to 2013. I am now throwing an undefined error ( -2146827284).

 

I've got a service request in and have talked to an engineer. THey are looking at the problem. However, I thought I would throw it out here and see if anyone had seen this particular problem.

 

Bryan Alexander

 

 

0 Kudos
Message 1 of 12
(4,916 Views)

check this link and see if it helps:

 

http://forums.ni.com/t5/LabVIEW/EXCEL-ActiveX-error-quot-2146827284-quot-but-not-the-string/td-p/177...

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 12
(4,908 Views)

Thanks, but the solution is not in there..

0 Kudos
Message 3 of 12
(4,884 Views)

Problem found, workaround implemented.

 

When you use the "New Report.vi", you have to wire in one of four choices for the state of the window. "Maximized", "Minimized", "Normal" and "No Change". If you use the "Excel Easy Text.vi" to insert data into an Excel 2013 Spreadsheet, it will generate an error if you opened the Excel file in "Minimized" mode. The other three states work fine.

Message 4 of 12
(4,869 Views)

I am having the same problem. Will try the work around but need this to run minimized.  Program works on some machines using office 2007, 2010, Works on development machine using office 2013 but does not work on at least one workstation using office 2013 on a 64 bit Windows 7. Using program built with LabVIEW 2015 32 bit and report generation toolkit.  Will attach picture of diagram.  Probe 48 no error,  49 shows error. Probes 50 & 51 show valid reference number.  This is a few layers deep in the report generation toolkit.

 

I understand this post is old so I may end up starting a new post if this one dies here.

 

0 Kudos
Message 5 of 12
(4,404 Views)

If you don't mind my asking, why do you need it to run minimized? If Excel is not already opened, wiring in the <No Change" option will leave Excel closed, i.e it will not open up on your desktop while it is writing to it.

 

I believe that using the <No Change> option will do whatever you need.

0 Kudos
Message 6 of 12
(4,395 Views)

I was unaware the no-change will leave it closed.  I have to wait for current testing to be complete on the workstation. As soon as the test stand becomes available I will give this a try.   The test program must have data calculated a specific times during a test so I basically just want the spreadsheet out of the way during this process. Minimized works well for  this use.

 

I have a version of this which did not have the toolkit which is working but I was hoping to switch back to using the NI report generation tools thinking it would be easier to maintain going forward. Up to this point it was working for me.

 

By the way thanks for responding. 

0 Kudos
Message 7 of 12
(4,386 Views)

No problem. I have Excel templates for different types of test reports that we generate. I use the same report generation techniques for 8 or 9 large applications. This bit me pretty hard when the upgrade to 2013 was pushed to our machines. 

 

Also, this runs much quicker in the background because the memory required to update the video is not used.

0 Kudos
Message 8 of 12
(4,379 Views)

The workaround appears to work. Using the Load with No Change rather than Minimized works but in this case there are times when the technician will refer to the Excel report during the process. Should the user minimize the spreadsheet the error shows up so this is really still a bug that will be problematic. I could drop the NI tool kit from this project but as mentioned before it would be nice have the tool kit work rather than handle the automation in my code.

 

By the way the problem is found in a subvi of the Excel Easy Text vi.

In my working app using automation here is a picture of the functions used. The left vi is specifies the cell name setting up the reference then the right vi is inputting the text.  It does not use the merge function.

 

I think I may submit a ticket on this to see if there are any other solutions or if this might help someone figure out a fix rather than a work around.

 

Thanks for the suggestion.

Randall

0 Kudos
Message 9 of 12
(4,363 Views)

I don't have 2013 to try this but open the report as Maximized to begin with and then change the state of the window to Minimized.  If you search for 2013 Excel windowstate, you'll see other people having a similar issue with VBA that only occurs in 2013. 

state.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 10 of 12
(4,354 Views)