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

How to access the values in a worksheet thro BASIC Macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
saravanakumar.gg
Newbie
Newbie


Joined: 16 Jul 2005
Posts: 2

PostPosted: Sat Jul 16, 2005 3:44 am    Post subject: How to access the values in a worksheet thro BASIC Macro Reply with quote

I am having a file named "mysheet.xls". In the first sheet of this file i am having some value. I like to use a BASIC Macro to get the valule and to calculate. I don't know how to get connected to the sheet.
_________________
Saravana Kumar G.G
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
JohnV
Administrator
Administrator


Joined: 07 Mar 2003
Posts: 8979
Location: Lexinton, Kentucky, USA

PostPosted: Sat Jul 16, 2005 7:07 am    Post subject: Reply with quote

This should get you started:
Code:
Sub Main
oDoc = ThisComponent
oSheet = oDoc.Sheets(0) 'Assumes Sheet1
oCell = oSheet.getCellRangeByName("B5")
v = oCell.getValue
Print v," ",v*3
End Sub
Back to top
View user's profile Send private message
MagnusA
Power User
Power User


Joined: 23 Sep 2004
Posts: 95
Location: Sweden

PostPosted: Sat Jul 16, 2005 8:30 am    Post subject: Reply with quote

.. and some more info and examples here:

http://www.oooforum.org/forum/viewtopic.phtml?t=4996

Good Luck
Magnus
_________________
Using OpenOffice.org 2.2.1 on Windows XP Home SP2.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc 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