LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview - save XY-graph in excel

Solved!
Go to solution

Hello,

 

I wrote a Labview-program, which generates a XY-graph. I tried to save it in excel as xlsx. It workes, but the data are saved as a integer and not with the positions after decimal point.

How can I change this, to get the right graph in excel?

 

My VI and the excel-file are in the appendix.

 

Thanks for every help!

 

Download All
0 Kudos
Message 1 of 14
(6,627 Views)

How are you exporting the data from LabVIEW to Excel, manually or programmatically? I didn't see the data export implemented in the VI you attached. Are you right-clicking on the graph and choosing Export » Export Data to Excel?

dK
0 Kudos
Message 2 of 14
(6,610 Views)

From your filenames, it seems there might be some German in there. Make sure you define the correct decimal delimiter (period or comma). If it is wrong, you lose the decimals.

 

Do you do a right-click...export to excel on the xy graph?

Message 3 of 14
(6,591 Views)

From your filenames, it seems there might be some German in there. Make sure you define the correct decimal delimiter (period or comma). If it is wrong, you lose the decimals.

 


Good point!

dK
0 Kudos
Message 4 of 14
(6,585 Views)

I don't see where you save anything to Excel.  You don't seem to be doing this via LabVIEW, including writing the numeric data that appears in the .xlsx file.

 

I was expected to see that you were using the Report Generation Toolkit and creating a Graph in Excel.  But it's not in the code you attached.  Is there other code we need to see?

 

Bob Schor

0 Kudos
Message 5 of 14
(6,579 Views)

I am sorry! I just downloaded the Sub-Vi, which I use to generate the xy-graph. Exporting the data is a next sequence in my whole "big program", called program temcont.

 

I also tried to right-click... and export to excel.

 

What do you detailed mean with "there is some German in there"?

0 Kudos
Message 6 of 14
(6,574 Views)

@StefanieWernet wrote:

What do you detailed mean with "there is some German in there"?

The file name contains the German word "Messung", potentially indicating that your computer might have a comma as decimal delimiter. Your code needs to correctly deal with that or you lose the fractional part (posting by phone, cannot see your vi)

0 Kudos
Message 7 of 14
(6,569 Views)

So you are exporting the data to excel using the 'Export Data to Excel' invoke method (which will give the same result as the right-click export data).

 

I think it might be the delimiter issue that Altenbach pointed out.

 

Could you share some raw data that you've collected in LabVIEW before exporting to LabVIEW? That will help to clear up what's happening when the data moves from LabVIEW to Excel.

dK
0 Kudos
Message 8 of 14
(6,565 Views)

Ah, you are using a Method of the Graph object to Export to Excel -- I've never done that, but have successfully used the Report Generation Toolkit to get Excel to accept data and produce Graphs.

 

You can find Examples shipping with LabVIEW (I think).  I wrote a Revised Example a few years ago that you can find here.

 

Bob Schor

0 Kudos
Message 9 of 14
(6,558 Views)

Hey,

I tried to export it to excel just in the original program (not as SubVI) and it worked. But if I use the program as a SubVI in my Labview-program "program tempcont", collecting data and then right-click to export it as excel, it is not working.

 

In the appendix are the raw-data (Array) and the excel-file of the program temcont.

 

Thanks for every help!!!

Download All
0 Kudos
Message 10 of 14
(6,521 Views)