LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data from excel to array

Solved!
Go to solution

Hi, Is there a way to input a large amount of data into an array control? I have a large amount of data, which I'm trying to input on the front panel of the LabVIEW interface.

 

Thanks,

Andrea

0 Kudos
Message 1 of 22
(6,976 Views)

Can you attach the file? That would be the easiest way for us to give you the appropriate help.

Tim
GHSP
0 Kudos
Message 2 of 22
(6,974 Views)

If you know about Quick Drop and the keyboard shortcuts I have just what you need right here.

 

http://forums.ni.com/t5/LabVIEW/QD-Shortcut-Paste-to-Array-Constant/m-p/1088366

 


0 Kudos
Message 3 of 22
(6,961 Views)

Spreadsheet String to Array in the string palette is the place to start.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 22
(6,958 Views)

 


@Darin.K wrote:

If you know about Quick Drop and the keyboard shortcuts I have just what you need right here.

 

http://forums.ni.com/t5/LabVIEW/QD-Shortcut-Paste-to-Array-Constant/m-p/1088366

 



I just installed LV2010 and I actually had to check and see if there was a new 'Import from clipboard/Excel' option.  Nope, only export.  It's a good idea although these features are almost going overboard in the name of convenience.  It's not difficult to use the LabVIEW functions to do this type of thing.

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 5 of 22
(6,955 Views)

 


@NIquist wrote:

 

I just installed LV2010 and I actually had to check and see if there was a new 'Import from clipboard/Excel' option.  Nope, only export.  It's a good idea although these features are almost going overboard in the name of convenience.  It's not difficult to use the LabVIEW functions to do this type of thing.

 


 

I have a slightly modified version of the QD shortcut which pastes the clipboard data into an existing control (edit mode of course).  Not bad, I can see the usefullness of an Import from clipboard function (ie. smarter pasting), maybe in LV11?

 

I use the shortcut I linked to mainly to create enums.  I can go to Notepad and quickly type the values I want for the enum, copy and use the shortcut to get a string array. A Right-click framework plug-in  converts the string array to enum and 'Bam!', much better than using the built-in method.  It is also useful for the forums, a lot of people put data in their posts, instead of typing I can copy and create an array.

 

You should post the 'Import' idea and see where it goes, maybe it already exists.

 

 

0 Kudos
Message 6 of 22
(6,944 Views)

Hi, I like the Spreadsheet String to Array idea so far ... Although I don't know anything about Quick Drop and the keyboard shortcuts.

 

Just an additional question - Looking further into my application, I'm unbundling the array from a cluster. Can an array be unbundled to a excel field, instead of an array field? I hope I'm making sense.

 

Sorry, I'm not sure if I can post my code online due to policies of the agency I'm working with.

 

Thanks,

Andrea

0 Kudos
Message 7 of 22
(6,906 Views)

Let me re-word my question ... is there any way of having an excel or spreadsheet field in a cluster? Alternatively, reading from a file would work just as well.

 

Thanks,

Andrea

0 Kudos
Message 8 of 22
(6,866 Views)

 


@AndreaD wrote:

 ... Although I don't know anything about Quick Drop and the keyboard shortcuts.


These are explained in the LabVIEW manual.

 


Just an additional question - Looking further into my application, I'm unbundling the array from a cluster. Can an array be unbundled to a excel field, instead of an array field? I hope I'm making sense.

Let me re-word my question ... is there any way of having an excel or spreadsheet field in a cluster? Alternatively, reading from a file would work just as well.

 

You need to be a bit more clear. Are you actually dealing with Excel workbooks, or text files? Where is this cluster that you are referring to that has this array as an element? I don't understand what you are talking about when you say having an "Excel field" in a cluster. Please provide some clarification as to what you are actually doing or tyring to do.

0 Kudos
Message 9 of 22
(6,852 Views)

Ummm...  Can you re-word it one more time please?

 

Are you wanting to take data from a spreadsheet (Excel or otherwise) and bring it into LabVIEW for further processing?

There is no particular need to manually fill a front panel control to load and process external data.  When you use the 'spreadsheet to array' type functions they read the spreadsheet file and generate a LabVIEW array that you can pass on to other functions down the line.

 

You can't have an actual spreadsheet in a cluster but you can have an array that represents the spreadsheet and it could be in a cluster.  This is what is confusing about your question.  Are you going from LabVIEW (arrays and clusters) to a spreadsheet file of visa-versa???

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 10 of 22
(6,850 Views)