LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple tables to excel file

Solved!
Go to solution

Hi

 

I get this error while writing two different tables to the same excel file. I think the issue is that the excel file must be closed to be written on again. But i'm unable to use close file function because there isnt a refnum. Should i be using notifiers? If so please tell me how to. Thank you.

Download All
0 Kudos
Message 1 of 2
(2,268 Views)
Solution
Accepted by Mayur_VIenthusiast

In your VI you have two instances of "Easy Excel Table.vi" which will execute in parallel. This is likely to cause a conflict, because as one opens and writes to the spreadsheet, the second will also try to open the same spreadsheet and write to it at the same time. You need to enforce sequential operation to ensure the second Easy Excel Table can only operate after the first is complete. The simplest way to do that in your VI is to wire the error out of the the first VI into the error in of the second VI, thus the second can only execute after the first has completed.

 

Secondly, the second VI also has a "New Report.vi" function, pointing to the same file, so there's a good possibility that this will overwrite your first changes. You say there is no reference to the excel file, but in fact there is. The top right terminal of the first Excel Easy Table vi is the report reference. Wire that directly into the Report In terminal of the second Excel Easy Table function and get rid of the New Report.vi.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 2 of 2
(2,240 Views)