LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I start a new line of text inside a cell in excel using labview?

Solved!
Go to solution

Below is the screenshot of my VI. Also I attached my VI.

Cap.JPG

This is what I am getting (I do not want the words to go beyond column H. So how do I do it using LabView?

Excel.JPG

0 Kudos
Message 1 of 5
(4,302 Views)

This sounds like an "Excel" question to me.  If you open Excel and type a long line of text into a cell, it will look something like this:

Excel 2013Excel 2013

The above example comes from Excel 2013.

If you want Cell F2 to fit the string, you do some Excel commands (I don't use Excel so regularly that I remember all the details ...).  If you want (as your example seems to illustrate) to have the text "wrap" in Cells F2, G2, and H2, you have to do some other Excel manipulations.  Some of these might be possible with the RGT, but first figure out what you want Excel to do, then see if you can get LabVIEW to "ask Excel" to do it for you.

 

Bob Schor

0 Kudos
Message 2 of 5
(4,253 Views)

Have you tried to just put a new line in your text?

I have LabVIEW 2012 so i could not use your VI, but i implemented it. Tested against Office 365 and Office 2003. For me it worked. Sort of. The text in the merged cells the text was cut at border. I also tried with a newline at the end of the string and then the text was wrapped and the cells expanded. But it was not pretty since it was to much empty space in the cells.

0 Kudos
Message 3 of 5
(3,356 Views)
Solution
Accepted by GRC5000

Just drop the RPG function Excel Set Cell Alignment and set the wrap text (F) input to True.  You may have to adjust the vertical height of the cell to make all the text visible.

Set Excel Wrap TextSet Excel Wrap Text

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
Message 4 of 5
(3,344 Views)

Thank you, Michael. That works!!!! That's exactly what I was trying to do.

0 Kudos
Message 5 of 5
(3,166 Views)