LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I insert a comment into an Excel cell?

I have created a vi that takes impedance measurements and inserts them into a company approved Excel form.  I can enter the S/N and measurements just fine, but I have addtional information or comments to be saved on each device.
 
To me the best method would be to insert a comment into each Ser Num cell.
 
How can I acheive this?
0 Kudos
Message 1 of 5
(4,758 Views)
Hi Glen,
 
I def. need more informations here. Are you writing in a simple spreadsheet as .csv or are you using the Report Generation Toolkit?
If I understand you right, that your S/N is a integer value. You can convert the S/N into a String and than use "Concatenate Strings" to build a single String containing S/N and comment.
 
It might be good, if you add an example here.
 
Stefan Henke
NIG
0 Kudos
Message 2 of 5
(4,734 Views)
Stefan
 
I am just writing into a simple .xls file.  This xls file is an official form that is controlled by our QA department and my program is to fill out the form and save it as a unique filename.
 
You're saying  that I should just concatonate all of the fields in the SerNum cluster and write them directly into the cell.  I would prefer to have just the SerNum displayed in the cell and have the other fields saved as comments in that cell.
 
Do you know if it is possible to insert comments into a cell through LabVIEW?
 
I have attached a simplified version of my vi.
 
Thanks in advance
 
Glen
Download All
0 Kudos
Message 3 of 5
(4,712 Views)

Adding comments to Excel cells is not possible with the shipping VIs of the Report Generation Toolkit.  It is possible, however, by editing the Report Generation Toolkit VIs.  Specifically, I was able to add a comment to an Excel cell by using the AddComment method of the Range class in ActiveX.  Whenever text is added to a cell by the Report Generation Toolkit VIs, a VI called "Excel_Insert_Text.vi" is called.  I modified its diagram in the following way to add a test comment to a particular cell, and it worked.  Here's the modification of the VI:

I will file a suggestion that a future version of the toolkit allow the additon of comments to Excel cells.  Let me know if you have any other questions.

Good luck,
-D

Message Edited by Darren on 08-31-2006 04:20 PM

Message 4 of 5
(4,706 Views)
A big thank you to Darren!  It works great
0 Kudos
Message 5 of 5
(4,679 Views)