From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DataFileExport

Solved!
Go to solution

Hello,

 

I face a problem with the Diadem command DataFileExport. Indeed, I would like to export one or several channels from the Data portal to an Excel file. I followed the help and wrote this very simple code:

 

Call DataFileExport("C:\Documents and Settings\dzhnw7\Desktop\Example.xls",[4], [Excel])

(my data portal is already loaded and the number 4 is the channel that I want to export).

 

But I got this error message :

 

Error in <NoName(2).VBS> (Line: 11, Column: 1):

Cannot determine valid parameters for the the load/save procedure "NOVALUE".

The name of the load/save procedure is unknown. (The name is either not defined or has not been entered correctly.)

 

Do you know the required modifications which are necessary for this kind of export?

 

Thank you

 

Jérémy

 

 

0 Kudos
Message 1 of 4
(4,743 Views)

I assume Excel does not support selective saving.

So there are two solution:

Call DataFileExport("C:\Documents and Settings\dzhnw7\Desktop\Example.csv",4, "CSV")

 or using a tdm file and the Excel addin to load data from the tdm file.

The addin is installed with newer DIAdem/LabVIEW versions or it can be retrieved at

http://zone.ni.com/devzone/cda/epd/p/id/2944

0 Kudos
Message 2 of 4
(4,735 Views)

Thank you very much, it works now. But with my piece of code, I'm not able to make a selective channel export. Indeed, I would like to export only some channels defined in a csv list (first column : channels to export). Here enclose is the code, I get a type error because of the parameter "channel_to_export", but I don't know how to  concatenate the channel numbers instead of the channel names. Thank you by advance for your support.

 

 

 

 

 

0 Kudos
Message 3 of 4
(4,713 Views)
Solution
Accepted by topic author Jeremy_TCL

Hi Jeremy,

 

You can find the channel's number property with CNo() command, assuming the channel name you're searching with is in the Data Portal.  Here's a minor edit to your script to put that in and build up the selected channel string.

 

Channels_to_export=""
iMax = UBound(Selected_channels)
For i = 1 to iMax
  IF i > 1 THEN Channels_to_export = Channels_to_export & ","
  Channels_to_export = Channels_to_export & CNo(Selected_channels(i))
Next

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,702 Views)