[Solved] Hide all columns

Java, C++, C#, Delphi, ??? - Using the UNO bridges

[Solved] Hide all columns

Postby antipod-sh » Fri May 27, 2011 1:27 pm

Hi! My English is bad, sorry! )
I need to hide first column, but after the code processing all the columns are hiding.
Code: Select all   Expand viewCollapse view
ServiceManager = CreateObject("com.sun.star.ServiceManager");
Desktop = ServiceManager.createInstance("com.sun.star.frame.Desktop");
Document = Desktop.LoadComponentFromURL("private:factory/scalc", "blank", 0, Array);
Sheets = Document.getSheets();
Sheet = Sheets.getByIndex(0);
Col = Sheet.Columns(0);
Col.IsVisible = 0;

1c7.7 -> OpenOffice 3.1
Last edited by antipod-sh on Sat May 28, 2011 7:25 am, edited 1 time in total.
OpenOffice 3.1 on Windows Server 2003
antipod-sh
 
Posts: 2
Joined: Fri May 27, 2011 11:05 am

Re: Hide all columns

Postby FJCC » Fri May 27, 2011 2:26 pm

The syntax Columns(0) is an OOo Basic shortcut for Columns.getByIndex(0). Does this version work?
Code: Select all   Expand viewCollapse view
ServiceManager = CreateObject("com.sun.star.ServiceManager");
Desktop = ServiceManager.createInstance("com.sun.star.frame.Desktop");
Document = Desktop.LoadComponentFromURL("private:factory/scalc", "blank", 0, Array);
Sheets = Document.getSheets();
Sheet = Sheets.getByIndex(0);
Col = Sheet.Columns.getByIndex(0);
Col.IsVisible = 0
Windows 10 and Linux Mint, since 2017
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 7748
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Hide all columns

Postby antipod-sh » Sat May 28, 2011 7:22 am

FJCC wrote:The syntax Columns(0) is an OOo Basic shortcut for Columns.getByIndex(0). Does this version work?
Code: Select all   Expand viewCollapse view
Col = Sheet.Columns.getByIndex(0);

Big thanks! It's work!
OpenOffice 3.1 on Windows Server 2003
antipod-sh
 
Posts: 2
Joined: Fri May 27, 2011 11:05 am


Return to External Programs

Who is online

Users browsing this forum: No registered users and 2 guests