From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hi

i have an excel file . .i am attaching the output excel file and the supposed output file.Can u please tell me how to do it ?

 

I have tried to do it. But its not coming in the correct format  . .

 

i am attaching the VI also .

Download All
0 Kudos
Message 1 of 2
(1,813 Views)

The data being written is exactly what you are sending.

 

I'll write out a simpliefied version of the first two lines (3 data points for simplicity of post.

 

Date \t Sec \t Data1 \t Data2 \t Data3 \r

Data1 \t Data2 \t Data3 \r

 

 

The first line of your spreadsheet string contains date, time, and 8 data points.  Your second line only contains 8 data points.  What you need to do is properly prepare the spreadsheet string before writing it.  

 

I would accomplish this by creating a 1D array for both date & time.  The Date array will be empty for all except the first value but must be the same number of elements as you have rows of the 2D data array.

 

The time array will be a bit more difficult as your format date/time string vi only excecutes every 125 data points.  So you'll need to know the time for each data point to fill a 1D array. (if you are fine with using a rough estimate of dt, this is just simple math to fill the array).

 

Then, insert the Date and Time arrays into your 2D data array (insert them before the data) before converting the 2D array into a spreadsheet string.

0 Kudos
Message 2 of 2
(1,789 Views)