LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent Excel from popping up the active report when opening any Excel file manually


@Theo_K wrote:

Hi Sam,

Would that not defeat the purpose?

 

We are using the RGT for the convenience and scalability it offers. If the customer decided to change their report layout all we would need to do is point to the new Excel cell where a value or an array of values should be inserted.

 

We are using a rather involved report format, therefore saving the data in a temporary CSV file would add a layer of significant complexity.

Certain values in the report can also be changed/overwritten retrospectively before the report is closed, which makes the temp CSV file approach even less appealing.

 

 

I can see that a few of the people who replied, have suggested the same thing (i.e. saving the data in a temporary file). This sounds like a painful workaround (perhaps the only workaround) to a rather critical RGT bug that renders the RGT completely useless for building up a report live during a test. RGT should be able to handle the problematic case, or even better the Excel report that is being populated should not be made visible in Excel under any circumstances. Would you not agree?


 

Until the RGT can directly write to .xlsx files without the need to open Excel* (which a user can interact with, interrupt, break etc.) to do it - I will not use it in any sort of production environment where the data is important. Saving the raw data to a file (doesn't have to be CSV...could be binary...TDMS...database etc.) during the test and then transferring that file into your Excel report is a much more robust solution and won't break if the user decides to open a Excel/random workbook while the test is running - and even if they do, you can just 're-report' the Excel file from the raw data file.

 

I believe the problem came around Excel 2010 where they started insisting that all workbooks open in the same instance of Excel...the RGT also doesn't support Office 365 as far as I know (it only supports the Offline Excel 2013 that comes with it)...so I wouldn't consider it to be that convenient going forward!

 

*I think this would be the major step forward - the xlsx format is an 'open' format (albeit pretty clunky, I believe) so it should be possible for the RGT toolkit to be able to write/manipulate the files directly without needing Excel/Office. I'm not sure how much work has been done (in LabVIEW? I'm sure there's some .NET library or something?) for this.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 11 of 12
(1,218 Views)

Bit of a zombie thread I know but it just came up in Google as I searched this myself.

 

The solution I implemented is to create a file with a header, and immediately save it to a file. I don't stream data every x seconds that my DAS mechanism records a point -- instead I wait until the one-minute mark OR until I have at least one data point (in case DAS interval is set to something like 5 minutes for a transition etc). Meanwhile I hang on to the file path that contains just a header, and reference that path as a template when it's time to record a point. Then I overwrite the template file.

 

This can run totally in the background if both file writes (the header file creation, and the Write call when a new batch of points is written) are flagged to run with No Change. It allows the files to stay closed, or be opened by the user. If the user has the current file open, at the one minute mark it will update as he watches.

 

Excel 2016 from Office 365 being called from LV 2009 RGT

0 Kudos
Message 12 of 12
(952 Views)