cancel
Showing results for 
Search instead for 
Did you mean: 

array constants to excel table

krispiekream
Active Participant

array constants to excel table

Hi, can someone help me with this.
I currently have 2 arrays of elements.
the elements are given from other files.
we are not getting data from any other devices as time goes. only from a given file.
i want to create a ways to enter these two arrays into an excel file.
For example.
array1=[1,2,3,4,5,6,7,8,9,10] (these array don't necessary have 10 elements all the time)
array2=[11,12,13,14,15,16,17,18,19,20]

my excel table will be
DATE TIME
Name of Array
Column:
X        y
1      11
2      12
3      13
4      14
...      ..
etc   etc
is it possible to do?
does anyone have an example?

Best regards,
Krispiekream
10 REPLIES 10
RavensFan
Knight of NI

Re: array constants to excel table

Message contains an image Message contains an attachment

This is not an excel table, but a text file that you would be able to import into excel.  Build a 2-D array out of the 2 1-D arrays.  Transpose.  Put it into Write to Spreadsheet File.vi.

 

Message Edited by Ravens Fan on 10-29-2007 08:30 PM

krispiekream
Active Participant

Re: array constants to excel table

that works.
what if i have more than 2 arrays?
I had, X & Y, that was 2D?
what if i have X,Y,Z....up to 8?

Best regards,
Krispiekream
Steve.Briggs
Active Participant

Re: array constants to excel table

Message contains an image Message contains an attachment

Just add to the build array...

 

Message Edited by Steve.Briggs on 10-30-2007 01:14 PM

Sima
Active Participant

Re: array constants to excel table

Message contains an attachment
If you have the Report Generation toolkit, you can easily bring the data into Excel once you've made it a 2D array. See attached.
krispiekream
Active Participant

Re: array constants to excel table

the last file you sent was in version 8.2.
can you save it for previous version?
i can open 7.0 or 8.0
thanks

Best regards,
Krispiekream
Sima
Active Participant

Re: array constants to excel table

Message contains an attachment
Try this. I saved to 8.0.
krispiekream
Active Participant

Re: array constants to excel table

it said that i am missing the following subvi
Excel Easy Table.vi
Excel Easy Table(num).vi
Excel Bring to Front.vi
can you help?
Best regards,
Krispiekream
Dennis_Knutson
Knight of NI

Re: array constants to excel table

Those VIs are part of the add-on called the Report Generation Toolkit. This is an add-on that has to be bought. Using the Write to Spreadsheet function is simpler and faster than using the toolkit. The toolkit uses Excel's ActiveX properties and methods to create a native Excel file instead of a tab or comma separated text file.
Sima
Active Participant

Re: array constants to excel table

As Dennis said, you probably don't have the Report Generation toolkit. If you wanted to output the data specifically to an Excel file, you'd need to get that toolkit. And that would be something you'd do only once you're ready to generate the report, not while you're acquiring data. Otherwise, write to a simple spreadsheet file.