LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write Multiple Data into Excel

Solved!
Go to solution

Hi everyone Smiley Happy

 

I am currently building a project to monitor room temperature using LabVIEW v.6i. I am try to get the data (date, time and temperature) into an excel file. The problem is now i want the data to be seperated into different column. So far the data is filled up in one column per row, as per picture below. I am attaching my VI as well.

 

What i need to add to make it date in one column, time in one column, and the temp in one colum, all in one row before the new data in another row.

 

Thanks in advance.

 

excelvi

0 Kudos
Message 1 of 11
(5,372 Views)

That's actually not a LabVIEW issue, but an Excel issue.

 

You need to get Excel to import the text file in a way that breaks it up into different columns by recoginizing the tab character as a delimiter.

0 Kudos
Message 2 of 11
(5,366 Views)

Change the file extension to .txt

0 Kudos
Message 3 of 11
(5,359 Views)
Solution
Accepted by topic author HeReL

Change your tabs for commas and save your file with the .csv extension. It should open like you want in Excel (you will have to convert the double value to a string).

 

Ben64

Message 4 of 11
(5,351 Views)

Thanks ben64

 

I did changed it to comma and it works =). Now what if I would like to insert header into each column such as DATE, TIME and TEMP on top of the colums?

 

excel2.JPG

0 Kudos
Message 5 of 11
(5,343 Views)

Write that before the loop starts!

0 Kudos
Message 6 of 11
(5,338 Views)

Where..?

 

At the New File vi or the Write File vi ?

0 Kudos
Message 7 of 11
(5,335 Views)

After the new file, before the wires go into the while loop.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

0 Kudos
Message 8 of 11
(5,333 Views)

Thanks. Will go look into that toturial 😃

0 Kudos
Message 9 of 11
(5,307 Views)

As Orioles Fan said, add a write file vi after the New File vi (before the while loop) and write to it this input string:

 

add header.png

 

Ben64

Message 10 of 11
(5,269 Views)