LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data excel exporting

Hello everyone. 

I want to export data to an excel template, so I used Ms office report. In the templates I have a graph that is automatically generated from the exported data (pressure versus time) time in this format hh: mm: ss.000, the problem is in the X axis the time does not appear there are only 0s (00: 00: 00,000) I don't know where is the problem any help please.

Download All
0 Kudos
Message 1 of 5
(1,077 Views)

Hi Malaak,

 

did you do some debugging by now?

 


@Malaak1 wrote:

the problem is in the X axis the time does not appear there are only 0s (00: 00: 00,000) I don't know where is the problem any help please.


Because you just write those "0" into the Excel file! (Which can be found easily when debugging with probes…)

 

You create those timestamp data as strings, then you (try to) convert those strings into a 2D array of floats: during that conversion the timestamp data is lost because they are no (typical) float values!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,010 Views)

Hi GerdW,

Thank you for your answer I want to export the data to an Excel file for traceability.

The time is correctly exported in this format hh: mm: ss, 000 to excel the problem is in the X axis as I said before but when I export the time without milliseconds I don't find any problem 

Download All
0 Kudos
Message 3 of 5
(997 Views)

Hi.  I ran your code (I had to "blow up" your Express VI, as there was no way to change the name of the Template otherwise), and I ran it with Highlight Execution on to watch what it did (which slowed it down a lot).  I don't know what it means, but it generated a semi-reasonable Excel output, complete with four measurements.

 

So the Good News is parts of your code are working.  The Bad News is you haven't learned how to debug.  Forget about Excel.  Just write the routine that generates the data you want to see and display the data in an indicator.  That way, you can see the values as they arise, and can see if they are all 0, or don't make sense.  

 

Once you have your algorithm generating reasonable data, try plotting the data in a LabVIEW Chart (or Graph -- do you know the difference, and when to use which one?).

 

You might investigate how LabVIEW Charts and Graphs handle the X Axis when it is time.  In particular, do you need to know the "reading on the clock" for your measurements, or is it more reasonable to pretend you clicked a Stopwatch at the start of your data collection and you plot your data against the time on the Stopwatch (which rarely will show the date, day of the week, even hour ...).  Learn more!

 

Bob Schor

0 Kudos
Message 4 of 5
(992 Views)

Hi Malaak,

 

Excel doesn't like timestamps with milliseconds...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 5
(989 Views)