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

Any simple demo how open a ODS file from C#,with Calc 3.0???
Goto page Previous  1, 2
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
rs2.pt
General User
General User


Joined: 20 Oct 2008
Posts: 8

PostPosted: Mon Oct 27, 2008 2:01 am    Post subject: Reply with quote

Confused to many work arrounds, on 2.4.1 was way simplier... at least for my needs; witch is comunicating/calculating over an ODS sheet using C#. Rolling Eyes geesh...

I rooled back my project, and put 2.4.1 Calc.exe as requirement, and offer a link on a setup on cd instalation with 2.4.1 - only Calc.exe is required ,it is not so "cool", or not so "pro". My app is a ClickOnce (with on/off line state) type, and the users could happen to have some weird policies about changes on registries... I dont know.

Yet there is a small group on our clients that has OpenOffice needs because they dont have excel. The rest has Excel 2003 minimum, so since my app already worked based on excel, the OO 2.4.1 is an extra...

Thanx for all guys, it a pitty that issue on 3.0, but for now 2.4.1 it will do the stuff.
Maybe I am to lasy to, and its my fault, I develop from about 6 years over Microsoft envoirment using MS toos like Visual Studio, and this was my first exeperience qith OpenSource OpenOffice apis...
Back to top
View user's profile Send private message
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Thu Oct 30, 2008 1:21 pm    Post subject: Reply with quote

rs2.pt wrote:
Confused to many work arrounds, on 2.4.1 was way simplier... at least for my needs; witch is comunicating/calculating over an ODS sheet using C#. Rolling Eyes geesh...


Be prepared to have this problem also with 2.4.1 installations. I looked today at computer in our company (windows XP SP3), where the opening of OO 2.4.1 via .NET failed. It was the only one computer, where using OO 2.4.1 via our program failed.

The reason was very simple - the cli-libraries were NOT stored within the GAC. I tried to repair the installation with the installer option, but this did not help. I deinstalled the 2.4.1 and installed it again and then it worked.
Back to top
View user's profile Send private message Visit poster's website
cycnus
General User
General User


Joined: 28 Jun 2007
Posts: 8
Location: Hong Kong

PostPosted: Wed Nov 05, 2008 12:11 pm    Post subject: A recap on the subject Reply with quote

I've made a blog entry on getting OpenOffice 3 and .Net to work:.
http://blog.nkadesign.com/2008/net-working-with-openoffice-3/

Most of the information was gleaned from this thread, Marten Feldtmann's sample code and the OO documentation.

Hope others will find it useful.
Back to top
View user's profile Send private message Visit poster's website
parc
Power User
Power User


Joined: 09 Nov 2007
Posts: 55
Location: Hamburg

PostPosted: Tue Nov 11, 2008 6:14 am    Post subject: Reply with quote

kasperih wrote:
Hi Parc

Thank you very much my application is working fine now.


Here the error description:

http://qa.openoffice.org/issues/show_bug.cgi?id=95255
Back to top
View user's profile Send private message Visit poster's website
baselnimer
General User
General User


Joined: 20 Sep 2007
Posts: 12

PostPosted: Sat Nov 22, 2008 9:35 pm    Post subject: Exact same problem Reply with quote

I want to make sure that i applied the correct fix:

1- Changed HKEY_LOCAL_MACHINE\SOFTWARE\OpenOffice.org\Layers\URE\1 to C:\Program Files\OpenOffice.org 3\URE\bin
2- Added C:\Program Files\OpenOffice.org 3\program to system PATH.

i found nothing about openoffice.org in HKEY_CURRENT_USER

Do i have to install .NET framework 3.5? i am using VS 2005 (.NET framework 2.0).

Please help.
Back to top
View user's profile Send private message
cycnus
General User
General User


Joined: 28 Jun 2007
Posts: 8
Location: Hong Kong

PostPosted: Sat Nov 22, 2008 10:02 pm    Post subject: Re: Exact same problem Reply with quote

@baseliner: read my article, you can just the the code provided.

You don't change the registry at all.
You just use it to find the real paths where OpenOffice stores its libraries and then use these results to create a local environment variable called UNO_PATH and append the OOo executable directory to the PATH environment variable.

And yes, the documentation for OOo 3 says you need .Net 3.5
Back to top
View user's profile Send private message Visit poster's website
baselnimer
General User
General User


Joined: 20 Sep 2007
Posts: 12

PostPosted: Sat Nov 22, 2008 10:21 pm    Post subject: Thank you Reply with quote

Thank you, it worked.

I was implementing the code at the following article:
http://www.forteanradio.com/?p=4

but then noticed what the code is doing, then got your code. i tried your code and it works.

BTW: it worked without .net 3.5?!!!

do i need 3.5 for a specific features? just wanted to know.


Thanks cycnus
Back to top
View user's profile Send private message
EmanHosny
Newbie
Newbie


Joined: 08 Sep 2013
Posts: 2

PostPosted: Sun Sep 08, 2013 8:26 am    Post subject: Same Probelm Reply with quote

Hello every one,

I am facing the same problem with both version 3 and 4 when i call the following line
it gives me the same error
var xLocalContext = Bootstrap.bootstrap();

I've tried you sugestions but no use, also i noticed that in the registry there's no Layers\URE , i tried to add them manually but no use too,

Any suggestions ??
Back to top
View user's profile Send private message
EmanHosny
Newbie
Newbie


Joined: 08 Sep 2013
Posts: 2

PostPosted: Mon Sep 09, 2013 2:00 am    Post subject: Reply with quote

Hello every one,

Currently i am using the OpenOffice 4 and it gives me the same exception when trying to call this function var xLocalContext = Bootstrap.bootstrap();
I 've tried all the above solutions but of no use also i noticed that in Openoffice 4 in the registry there 's no Software\OpenOffice.org\Layers\URE\1

Any suggestions??
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
Goto page Previous  1, 2
Page 2 of 2

 
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