04-20-2016 05:15 AM
Hello,
I have another question...i would (i don't know if it is possible) autosize the column dimension...see the string inside the cell and size the cell to make possible read the string without problem. (in excel is possible do it double-clicking on the top level of the column)
i see there is a vi to set the dimension (inch or cm)...but i don't know the max dimension..
there is a way to solve my little-big problem?
Thank you 🙂
04-20-2016 05:29 AM
Hi,
I suppose it would work like in this example: Autofit
But you would have to get the reference to the file from somewhere. I'll try it out and get back to you.
04-20-2016 05:39 AM
Just as I suspected (with the distinction that we're using ActiveX and not .Net)
04-20-2016 06:14 AM
and if i want autofit just 1 column? 🙂 there is a way to do that? 🙂
04-20-2016 09:19 AM
@Gianluca1985 wrote:and if i want autofit just 1 column? 🙂 there is a way to do that? 🙂
Yes, but it's a little bit more tricky. This following example will autofit the C column.
Ben64
04-21-2016 02:39 AM
I couldn't get that to work yesterday since I didn't know what the Cell Input had to look like...
Also: Having to use a completely different class, to do something slightly different seems redundant to me. I don't want to talk badly about the Office activeX connection, since it has been good to me, but this seems odd.
04-21-2016 05:13 AM
PeterFoerster a écrit :I couldn't get that to work yesterday since I didn't know what the Cell Input had to look like...
Also: Having to use a completely different class, to do something slightly different seems redundant to me. I don't want to talk badly about the Office activeX connection, since it has been good to me, but this seems odd.
I agree it seems odd. From what I understang the Autofit method works only on columns and rows type range and will fit all the columns (or rows) in the selected range. So I had to select a worksheet range that is a single column and "convert" it to the more specific columns type class.
Ben64
04-21-2016 08:24 AM
hello...thanks...but in my program doesn't work 😞
i have done as in figure...could you tell me where i have make mistake please?
04-21-2016 08:29 AM - edited 04-21-2016 08:30 AM
Look at your wiring between Range: Columns and Range: Autofit
Ben's screenshot is also a VI snippet which lets you drag and drop the image to a block diagram to get real code in a VI.
04-21-2016 08:55 AM
IT WORKS!!! 😄 thanks to all!!!!!!! you have made a man happy!