ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To log and export data to excel file with column headers

Solved!
Go to solution

Hi...

 

I need to log sample number, date and time, voltage, current and power to a excel file and need to export that data to a specified location on the system. Can anyone help me with this?

 

Thankyou.

 

0 Kudos
Message 1 of 6
(2,282 Views)

Hi stark,

 


@stark8 wrote:

I need to log sample number, date and time, voltage, current and power to a excel file and need to export that data to a specified location on the system. Can anyone help me with this?


Sure we can help…

 

  • What exactly is an "excel file"? Is a simple CSV text file sufficient (as its much easier to create)?
  • What is a "location in the system"? Do you mean specific folder and filename? You can define this easily using a filepath constant…
Best regards,
GerdW


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

Excel file means .xlsx file and save location would be the current VI folder.

 

0 Kudos
Message 3 of 6
(2,242 Views)
Solution
Accepted by topic author stark8

Hi stark,

 


@stark8 wrote:

Excel file means .xlsx file


Use the ReportGeneration functions to create/handle XLSX files.

There are example VIs in the example finder…

 


@stark8 wrote:

save location would be the current VI folder.


Which is a bad decision, you better use "public" folders like Desktop or UserAppData…

There is a File constants palette with lots of predefined path constants (including CurrentVIPath), including a function to select several pre-defined folders in typical Windows environments!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(2,221 Views)

Hi....

 

Can you send me an example program for this. I can't find examples for the above.

 

Thankyou

 

0 Kudos
Message 5 of 6
(2,061 Views)

Hi stark,

 


@stark8 wrote:

Can you send me an example program for this. I can't find examples for the above.


What is "this" and what is "the above"?

Please ask specific questions. It also helps to quote other messages (like I do) to provide context for your questions!

 

Maybe you are talking about the Report Generation functions:

Best regards,
GerdW


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