List Info

Thread: RE: Hide column in Excel using delphi




RE: Hide column in Excel using delphi
country flaguser name
United States
2008-03-11 12:47:07

Adrian,

> Im trying to come up a way to hide or unhide a column in excel sheet using
>delphi. Right I can use this command to hide or unhide a column in excel
>
> Excel.Selection.ColumnWidth := 0; // hide
>; Excel.Selection.ColumnWidth := 20; // unhide
>
> Is there other way of doing this same as vba. See below:
>
> Selection.EntireColumn.Hidden = True

What happens if you do:

Excel.Selection.EntireColumn.Hiddend:=True;

Have you tried that?

Glenn Lawler
www.incodesystems.com

__._,_.___
.

__,_._,___
RE: Hide column in Excel using delphi
country flaguser name
United States
2008-03-11 12:49:10

I just figure out that this one works.

XlApp:= CreateOleObject('Excel.Application');
xlapp.Visible := TRUE;
XlApp.ActiveSheet.Columns['A:A'].Hidden := True; // hide
XlApp.ActiveSheet.Columns['A:A'].Hidden := False; // unhide

"Glenn B. Lawler&quot; < gblawler%40incodesystems.com">gblawlerincodesystems.com&gt; wrote:
Adrian,

> Im trying to come up a way to hide or unhide a column in excel sheet using
&gt;delphi. Right I can use this command to hide or unhide a column in excel
&gt;
> Excel.Selection.ColumnWidth := 0; // hide
>; Excel.Selection.ColumnWidth := 20; // unhide
&gt;
> Is there other way of doing this same as vba. See below:
&gt;
> Selection.EntireColumn.Hidden = True

What happens if you do:

Excel.Selection.EntireColumn.Hiddend:=True;

Have you tried that?

Glenn Lawler
www.incodesystems.com

---------------------------------
Never miss a thing. Make Yahoo your homepage.

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )