LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to Excel

Solved!
Go to solution

Hey Jean, Thanks again for helping out. I am trying to implement you solution but dont know what 1 block is, I see the following:

build array, transpose 2D array, excel easy text, excel easy table, save report, dispose report, new report. The block I can't figure out is before the build array block.

 

***Edit***

I'm assuming also that the 0 and 1 clusters are in the "start" input correct?

0 Kudos
Message 11 of 24
(2,158 Views)

yes, that's right, they give the start coordinates for the write process

the ones you don't recognize are number to fractional string (strings-> numeric to string palette in lv2012)

__________________
Engage! using LV2015
Message 12 of 24
(2,148 Views)

Thanks Jean. Not exactly yet what I'm wanting but better then where I was before. I'll work on this starting point over the weekend and will post my results on Monday.

 

More details on want I'm looking for is for the magnitude to be next to it's corresponding frequency. The frequency is an input and the magnitude is the output. For example:

 

100Hz | 7.9542 mV

160Hz | 8.6324mV

....

 

But with this starting point I might need to redo certain portion of the code maybe, have a good weekend everyone 😃

0 Kudos
Message 13 of 24
(2,142 Views)

oh, I see now, what you want

you need to create the frequency array based on f0 and df (take the length of the magnitude array and use it in a for loop to add i*df to f0, so the first element will be f0, and then increase it with df)

in the excel easy tables I use the "top right" output of the first one and wire it to the start input of the other to have them aligned nex to each other

 

report2.png

__________________
Engage! using LV2015
Message 14 of 24
(2,135 Views)

Hi jeanlucpicard

 

 

1. I use your suggestion to write to excel. but when I import any data to excel, it shift. when I want just replace a data, it shift again! can you help me about that?

2. can we write data without opening excel? because I want dont see opening and closing that while it work repeatedly.

 

 

Best Regards

0 Kudos
Message 15 of 24
(2,108 Views)

1. I don't understand what you mean by shifting. You need to change the coordinates accordingly.

2. unbfortunately, it seems to be using excel in the background, so it will open and close, however, you can use the minimize or no change property on the set new report vi

__________________
Engage! using LV2015
Message 16 of 24
(2,090 Views)

@behzad1 wrote:

Hi jeanlucpicard

 

 

2. can we write data without opening excel? because I want dont see opening and closing that while it work repeatedly.

 


The Report Generation Toolkit works by passing requests to Excel, so running Excel is necessary for this to work.  If you don't want to "see" Excel open up (and take up room on your screen), I recommend opening it with the Minimized option.  

 

Bob Schor

Message 17 of 24
(2,076 Views)

Thank you

 

hi jeanlucpicard;

if we want to add new data, it is neccessary to  address to input block too. now, when open excel file, and replace a row to row 3, all data shift down 1 row.

 

Best Regards

0 Kudos
Message 18 of 24
(2,044 Views)

then read all the data from excel, manipulate the data array in labview, then delete all from the excel sheet and write the manipulated array

__________________
Engage! using LV2015
0 Kudos
Message 19 of 24
(2,035 Views)

So I tried a couple of different ways using the setup we've been working with and just wasn't getting what I need. 

I decided to go a different route but I am only getting the last output to save. there is just 1 frequency value in column 1 and 1 magnitude value in column 2. nothing else is saved. this VI is attached.

 

Attached is an example of what im looking for in excel that i made manually really quick.

excel.PNG   block.PNG

 

0 Kudos
Message 20 of 24
(2,018 Views)