DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel To Diadem

Hello,

 

I am having difficulties calling in a 2nd excel document into my script and adding the data within the excel document into the channel properties. What I am trying to get my program to do is read a file called HVAC list in, compare the column "Alias" to the channel names, if that happens add the data into the channel properties. I am struggling comparing ALIAS to ChanNames. Any help would be greatly appreciated. Thank you!

0 Kudos
Message 1 of 3
(3,312 Views)

Hi,

Can you please reduce your example and add some comments. Right now it's not executable and there is no documentation at all.

At the end of your DataPlugin something seems to be missing and the variable ChanName that you are trying to compare with Alias is defined nowhere.

That makes it very difficult and time comsuming to understand what you are trying to do.

My best guess is that you are trying to read the CSV file and compare its channel names to the content of your Excel files, right?

What content of the Excel file should be copied to your channel properties?

 

Also I recommend to use StrComp to compare strings as the = operator is case sensitive and StrComp can be configured to be not case sensitive:

call MsgBox(StrComp("Text1","text1",vbTextCompare) = 0)
Christian
CLA, CTA, CLED
0 Kudos
Message 2 of 3
(3,276 Views)

Hi Tevin,

 

I created the Nissan_CSV DataPlugin for  Dan Leebeck, and we agreed it would look for a "Test Input.xlsx" file in the same folder as the CSV data file and read in all the properties in that Excel file.  It looks like the only information that is in the "Master HVAC and Thermal List  MLM.xlsx" file that is not already being read in is the aliased channel name.  Should the DataPlugin expect there to be a file named "Master HVAC and Thermal List  MLM.xlsx" in the same folder as every data file, or should it look to a central location for that file?  Will the file always have that name?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 3 of 3
(3,268 Views)