Example Code

Write Individual Rows of Data to Excel Spreadsheet

Code and Documents

Attachment

Overview
This example VI show a way to write a single row of data to an Excel spreadsheet.

 


Description
This example writes a single row of data to an Excel spreadsheet using the Report Generation Toolkit. A set of random data is generated and built into an array. This VI opens an Excel file, checks for the first empty row in that spreadsheet and writes the data to the first empty row.

 


Requirements

  • LabVIEW 2012 (or compatible)
  • LabVIEW 2012 Report Generation Toolkit for Microsoft Office (or compatible)
  • Microsoft Excel 2003 (or compatible)


Steps to Implement or Execute Code

  1. Download the attached folder to your computer
  2. Open the VI "Write Row of Data to Excel Spreadsheet 2012 NIVerified.vi"
  3. Run the program
  4. Choose the location of the Excel spreadsheet to be written in the "Excel File Control"

 

Additional Information or References
VI Snippet

 VI Snippet.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Dinesh.K
Member
Member
on

I had tested the file it dose not load the last data

Transt
Member
Member
on

Hi Dinesh,

  I just download your VI but one sub VI Excel Get Last Row missing where could I get it.

  Thank you

Zahkay
Member
Member
on

Hello

I wanted to ask

Is there solution concerning labview interfacing with excel. I wanted to make a database. Once i scanned my QR code and the decoded QR code should be store in the excel. I dont know how to link it. Also i have to update information concerning when the student is borrowing or taking equipment. The GUI also  should be in labview

Anything for this please

Courtney_L
NI Employee (retired)
on

Hey Zahkay,

Yes - there are lots of ways to export data from LabVIEW to Excel. Check out this article for more info. There are shipping examples and other examples on the community that show you how to use TDMS or Write to Measurement File functions.

mgbglasgow
Member
Member
on

doesnt work,, VI excel issue for last line Get Last Row.vi error ,,,

r4ba
Member
Member
on

Hi,

how to save different data type at the same time to the same excel sheet?

Jerryzhang
Member
Member
on

Hello: I want to ask how to setup new Excel with labview.I want to write new program about analysis test data.Can you give me some suggestions about this program?Thanks

JW82
Member
Member
on

Holy shnikies, I have been messing around trying to get to this point and your vi saved me!!!! THANK YOU SO MUCH!!!!

DalyaJGP
Member
Member
on

Hola buen día, estoy haciendo un proyecto de control de temperatura y de ph en un tanque y pues mientras practicaba con LabVIEW me puse a pensar si es posible que, teniendo diferentes datos en dos o mas tablas de control en el VI, ¿es posible guardar estos datos en diferentes hojas de calculo dentro del mismo documento de EXCEL? y si es posible, ¿Cómo se haría?

Gracias.

Hi, is possible save datas in differents Excel spreadsheet inside the same excel document? and if it's possible, how can i do that?

ponkumar
Member
Member
on

hi,

   If i run above program the error will occur. Please any one help me. write.PNG

 

 

ponkumar
Member
Member
on

hi, 

i am a new user for LabVIEW. I use LabVIEW 2012. I my company we manufacture the motor. my work is test the motor with reference of barcode and calculate power,power factor,RPM. The reading are i get it. But i don't know how to generate customized report. i have report generation toolkit for microsoft. please any one give example.

ponkumar
Member
Member
on

Hi, 

I execute the while loop with eight iteration. In every iteration value to be store in single row but different column. please any one help me.