05-01-2017 04:07 PM
Hi,
I am trying to open an excel sheet that has a matrix in it. and I want to set the set the size of the cells to auto-width and auto-height. Also I want to set the font of my headers to bold. I also want to use an array of names where I can check against the first column of the matrix. If any of the array names matches a name in the matrix first column, it should highlight the whole row in red. I am trying to do that programmatically but so far I cant find my way around labview activex.
would you please direct me.... I attached my VI in LV 2016
Solved! Go to Solution.
05-01-2017 05:03 PM
Well, I tend to do as much with RGT and as little with ActiveX as possible. Here's my "Red One Row" (as opposed to another VI, Read One Row) that turns the selective text in the row Red (you can guess what Black One Row looks like).
[Confession -- the function "Row Limits", I'm embarrassed to admit, does use ActiveX -- it looks at the UsedRange property of the Worksheet, gets Columns, and sets Row Start's Column to Count-1, the last Column. However, Next Row is "pure", mostly ...].
Bob Schor
05-01-2017 05:38 PM
Thanks for replying, but I could not open the row limits vi.. plus I have a feeling the cluster constant with the preset font settings may be for the over worksheet. I am looking to select specific row to color or others to bold.
05-01-2017 10:11 PM
@ritch_by_nature wrote:
Thanks for replying, but I could not open the row limits vi.. plus I have a feeling the cluster constant with the preset font settings may be for the over worksheet. I am looking to select specific row to color or others to bold.
You are correct on both observations. I did not attach Row Limits, rather I told you what it was (ActiveX, and I specified all the steps). And yes, I specify the entire WorkSheet, but the function I was using to apply the Format specifies the beginning and ending Cell. My function "Red One Row" turns one row Red by specifying the first Cell of the row, uses Row Limits to get the last Cell of the row, so together they specify the beginning and ending Cell, just what the Excel Set Cell Font function requires. Did you read the Help for this function?
Bob Schor