LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I set Excel Data In LabVIEW

Hi,

 

There is an example about  how to use LabVIEW and ActiveX to programmatically read in Excel data. It uses Range and then by reading Value2 it is possible to read excel values in that range in a specific sheet.

 

https://forums.ni.com/t5/Example-Code/How-Can-I-Read-Excel-Data-Into-LabVIEW/ta-p/3996190

 

Now I would like to write data ( 2D string ) to specific excel sheet. Could you please let me know if there is a way to modify this code to use it for writing to Excel instead of reading

 

I actually would like to write 2D data to specific sheet of an Excel form. The Read_Excel_Values.llb works perfect for opening an Excel file, specify a sheet and then read the data but I would like to write instead of read.

 

Thanks 

0 Kudos
Message 1 of 8
(3,756 Views)
What is your problem with just using the Write to Spreadsheet File? The latest version of LabVIEW and the Write to Measurement File supports direct to excel format. Did you look at the example that comes with LabVIEW?
0 Kudos
Message 2 of 8
(3,742 Views)

Could you plz let me know how can I write to a specific Excel sheet using Write to Spreadsheet File?

0 Kudos
Message 3 of 8
(3,725 Views)
You can't directly but you can open excel and then import to a specific sheet.

Do you have the report generation toolkit? Have you looked at the shipping example? Have you looked at the examples in the excel board?
0 Kudos
Message 4 of 8
(3,720 Views)

There are few examples in the Excel forum but I still couldn't fine any example to write to specific Excel sheet. 

0 Kudos
Message 5 of 8
(3,698 Views)
The excel properties such as active sheet are all documented in excel.
0 Kudos
Message 6 of 8
(3,685 Views)

Hi Tintin,

Please find the attached VI where i tried to write a 2d array using activeX functions to an excel sheet.

 

 

Regards,

Srikrishna.J

 WriteExcel_Activex_BD.png

Regards,
Srikrishna


0 Kudos
Message 7 of 8
(3,651 Views)

If you have the Report Generation Toolkit, there are some Excel specific functions for writing values into cells of a workbook.

Capture.JPG

aputman
0 Kudos
Message 8 of 8
(3,622 Views)