01-20-2009 06:43 PM
I have a 1D complex array in a consumer loop which runs continuously. How can I store the complex array data in to an excel sheet. All the values should be appended to that excel sheet after every iteration. For every iteration I get 4096 complex numbers.
I tried using write array to spreadsheet.vi but it didnt work. Please post an appropriate VI for reference.
01-20-2009 08:02 PM
In what way didn't it work?
How do you want the data to look? Excel doesn't know about complex data. So you will have to break apart the array into real and imaginary points and send them to either Excel, or to the "spreadsheet" like text file as separate columns.
It is much easier if you post what you have then for us to fumble around trying to create a "reference" vi.
01-20-2009 10:34 PM
Hi,
You can use ActiveX Controls to Handle this kind of speradsheet easily.
and treat the complex number as string.... or separate real and imaginary part and write into separate columns in the Excel Sheet
ANil
01-21-2009 10:26 AM
I am posting the Vi I have for reference. I have to save the data after FFT in the consumer loop. The FFT is inside the case structure.
Actually What I want to do is I want to compare the FFT data for 4 iterations. Thats the reason I want to save the data in excel sheet.
The problem I was getting if I use "write to spreadsheet.vi" is I dont have any data in the excel sheet after I stop running the VI.
Because Appending Data to an Excel Spreadsheet Using Write to Spreadsheet File.vi Does Not Update the File.
01-21-2009 04:27 PM - last edited on 06-03-2013 06:05 PM by JordanG
Hello,
I have posted an example VI which demonstrates how you could append an array of complex numbers to an excel spreadsheet. I hope this helps.
01-21-2009 04:57 PM
Vivek_N wrote:Hello,
I have posted an example VI which demonstrates how you could append an array of complex numbers to an excel spreadsheet. I hope this helps.
That's not an Excel spreadsheet. That's a text file. Please don't continue the confusion that new users have with the Write to Spreadsheet File in which they think they're writing Excel spreadsheets because of the poor choice in naming that function.
01-21-2009 05:11 PM
venki_tav wrote:I am posting the Vi I have for reference. I have to save the data after FFT in the consumer loop. The FFT is inside the case structure.
Actually What I want to do is I want to compare the FFT data for 4 iterations. Thats the reason I want to save the data in excel sheet.
The problem I was getting if I use "write to spreadsheet.vi" is I dont have any data in the excel sheet after I stop running the VI.
Because Appending Data to an Excel Spreadsheet Using Write to Spreadsheet File.vi Does Not Update the File.
Given that your VI doesn't even have the Write to Spreadsheet File, then it's not clear what you're saying. If you want to do the FFT when you have 4 iterations, then that's the same as saying you have 4 elements in the queue. You can use the Get Queue Status to tell you how many elements are in the queue. Note that this does not refer to the number of elements in the array - each element in the queue is an array of data. Do you need to do the FFT on the data from the 4th iteration, or are you trying to do something else?
01-21-2009 05:39 PM
01-21-2009 05:46 PM
01-21-2009 05:55 PM - edited 01-21-2009 05:58 PM
How to Prove that data is not lost in producer consumer loop ?