OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Documenation for Beginner

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
dmccol
Guest





PostPosted: Fri Mar 26, 2004 2:33 pm    Post subject: Documenation for Beginner Reply with quote

Hi,

Is it just me, or is the documentation for how Open Office Basic interacts with documents such as spreadsheets poor? Where should I look in the on-line help? There seems to be plenty of documation of the detail of the functions, but not the big picture.

The sort of thing I would like to do is like:

For worksheet in Application.getWorksheets()
Do
processing on all rows
update first worksheet.
End Do

Thanks,
Dave.
Back to top
Danad
OOo Advocate
OOo Advocate


Joined: 22 Feb 2004
Posts: 293
Location: Brasil

PostPosted: Fri Mar 26, 2004 5:14 pm    Post subject: Re: Beginner doc's Reply with quote

Hi Dave !

Look here:
http://docs.sun.com/db/doc/817-1826?q=StarOffice
for Sun Basic Programmer's Guide.

And here: http://www.oooforum.org/forum/viewtopic.php?t=4996 for some samples.

Bye
Danad
Back to top
View user's profile Send private message
dmccol
Guest





PostPosted: Sat Mar 27, 2004 7:43 am    Post subject: Reply with quote

Thanks,

This is the kind of thing I wanted to start with:

Sub Calculate

oDoc = ThisComponent
number = oDoc.getSheets().getCount()

total = 0

For i = 1 To (number-1)
oSheet = oDoc.getSheets().getByIndex( i )
range = oSheet.getCellRangeByName("O39:O39")
cell = range.getCellByPosition(0,0)
total=total+cell.getValue()

Next

oSheet= oDoc.getSheets().getByIndex(0)
oSheet.getCellRangeByName("B4:B4").getCellByPosition(0,0).setValue(total)

End Sub

The double action to get a cell looks clumsy, but I'm getting there.

Dave.
Back to top
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Sat Mar 27, 2004 11:07 am    Post subject: Reply with quote

Here is some information which may help.

http://www.oooforum.org/forum/viewtopic.php?p=24224#24224
_________________
Want to make OOo Drawings like the colored flower design to the left?
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Mon Mar 29, 2004 8:47 am    Post subject: Reply with quote

There is documentation here in sevral languages :
http://api.openoffice.org/TipsAndTricks/external.html

Also document in french from Bernard Marcelly
http://fr.openoffice.org/Documentation/How-to/indexht.html
under the title : "l'API d'OO (presque) sans peine"
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group