DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Importing Excel File Setup by Columns

I have an engineer that is requesting data to be converted from an Excel file for use in DIAdem. The file is a compilation of data based on a search query in a database. Each line is a seperate occurance logged in the database. In the example below "TEMPERATURE MAXIMUM" was searched over a certain time period for a particular Unit ID. To import this into DIADEM I would want to make each unique UNIT ID a group, and each unique Definition Description as a channel name within the corresponding group. For the data I would want to have Begin Capture Time as a time channel ( it would need to be organized from earliest date to latest) with it's corresponding value placed into the channel named by the definition description.

 

I also have the ability to export the fiel from the database program into a .csv file.

 

Can this be done usign the standard import wizard. I was unable to find a way.

 

-MK

 

MKCExample.png

 

 

 

 

0 Kudos
Message 1 of 8
(6,249 Views)

I realized that I had misinterpretted the needs of the user.

 

The measurement values are a bin value, the user is looking for the ability to not only graph along a time, but also the ability to count the amount of times a bin occurs to plot a histogram per Unit ID or possibly for subsets of Unit ID's. I was going to delete the thread while I re-evaluated, but I think if I get the data imported into DIAdem I can then work on developing the histogram.

 

-MK

0 Kudos
Message 2 of 8
(6,241 Views)

So if I understood correctly, you just need to be able to import a file from Excel into Diadem?

 

You should just be able to select File -> Excel Data Plugin Wizard and then the file you wish to import and then set up the import as you desire. If there is anything more specific about the import you would like to know, please ask.

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(6,199 Views)

The issue is that the import wizard reads everything by row. Using the wizard makes Unit ID a channel full of unit codes.

 

I think that what I would like to setup is to import line by line where a script would look at each line of data, set the Unit ID as a group, the Definition description as a channel name, and then write the time stamp and measurement value in that channel. It would have to go through line by line and assign each line to the appropriate group and channel (creating new ones as neccesary). For something like unit it would need to check that the units are the same before it writes it to the channel.

 

This is a little different than the typical way we see data as this is more of a database than data aquisition. I will also be able to get the data in CSV, which will make things much easier for importing.

 

If anyone has worked on something similar to this, let me know. I will be trying to write a script for this then try to find a way to include it into the associated files to import.

0 Kudos
Message 4 of 8
(6,192 Views)

Thank you for the detailed descrition, this definately sounds like something we could accomplish with scripting. I'll see if I can play around with this and get it to work. 

Rob S
Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(6,168 Views)

Hi MK,

 

I suggest you use a DataPlugin that declares each row of your Excel file as a Group, and each column value of that row as a Group property.  That way you can query just the rows you want from the DataFinder using the DIAdem NAVIGATOR and load just those desired rows into the Data Portal.

 

Here's a DataPlugin that does that,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 6 of 8
(6,116 Views)

I'm just now getting a little bit more time to work on this. I ran the plug in that was posted, but it provided no different results than when I ran through the plug in wizard. I ended up with an import that is a channel called Unit ID with a list of each unit ID (see image below).

 

 

Brad, I'm not sure I understanding each row as a group.

 

I have gotten a csv file that I am attempting to make a VBScript for, but my lack of knowledge with VBS is slowing me down (only one way to learn though, right?)

 

My desired output will be 

 

Group 1 - ABCDEFG123456

Channel - Time

Channel - Temperature Maximum. 

 

-MK

 

0 Kudos
Message 7 of 8
(5,979 Views)

Hi MK,

 

You didn't see any difference because you didn't query the data in the file-- see the attached screenshot of what that looks like.  With a query you can pick exactly which rows you want to load from as many files as you want.  It's hard for me to guess your use case based on 14 rows of data that are all temperature.  Are you usual data files longer than this?  Do you ever have data other than Temperature in those data files?  Do you want to compare data from multiple files?

 

I would welcome a set of ASCII files, if your process is to import those CSV or TXT files into Excel.  Then the DataPlugin could save you that steo as well.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 8 of 8
(5,936 Views)