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

get value of selected cell using UNO

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


Joined: 31 Jul 2006
Posts: 2

PostPosted: Mon Jul 31, 2006 4:41 am    Post subject: get value of selected cell using UNO Reply with quote

Hi
can anybody tell me how can i get the value of the selected cell using uno api.
I am displaying the excel document embedded in java application using officebean.

ravi
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 Jul 31, 2006 6:53 am    Post subject: Reply with quote

I have tackled the problem but with a cellrange and in C++ here :
[url]http://wiki.services.openoffice.org/wiki/OpenOffice_Calc#Getting_a_Cell_range_with_a_Selection [/url]
_________________
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
JohnV
Administrator
Administrator


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

PostPosted: Mon Jul 31, 2006 8:15 am    Post subject: Reply with quote

Here some Basic code.
Code:
Sub Main
oCell = ThisComponent.CurrentSelection
print oCell.Value
print oCell.Formula
print oCell.String
End Sub
Back to top
View user's profile Send private message
ravimenon31
Newbie
Newbie


Joined: 31 Jul 2006
Posts: 2

PostPosted: Mon Jul 31, 2006 10:13 pm    Post subject: get value of selected cell using UNO Reply with quote

Hi
thanks for the reply but ,
actually i want the value in java. hence writing a macro is of no help, because there is no way to capture the retrun value of a macro. (i am calling the macro using dispatch())

i am looking at something which can be done using the xDocument object in uno.
is it possible using uno java api

thanks
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 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