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

OpenOffice With Asp.Net

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


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 11:51 am    Post subject: OpenOffice With Asp.Net Reply with quote

Hi, new to this form and new to Asp.Net C# and OpenOffice. I am trying create a small program that will allow me to create and save a OpenOffice Calc worksheet from a dataset. This would save tons of money for my company instead of a license for MS Office on the server. I have read a lot of posts on this by LarsB. I have tried to take some of his code and get it to work on my end here. I get hung on the

unoidl.com.sun.star.uno.XComponentContext localContext =
uno.util.Bootstrap.bootstrap();

I have gone into my machine.config file an set Username to "System". Does anybody have a working project that I can look at with an example machine.config.. I am also using IIS6.0 Or if not a working project does anybody have any other debug solutions beside the machine.config?

I would really appricaiate the help!!!!!! Thanks in Advance
Jay
Back to top
View user's profile Send private message
LarsB
OOo Advocate
OOo Advocate


Joined: 31 Aug 2005
Posts: 445
Location: Hamburg, Germany

PostPosted: Mon Feb 13, 2006 12:41 pm    Post subject: Which .net version Reply with quote

Hi,

which .net version do you use? 1.1 or 2.0? If you use 2.0 you will will run into trouble!
The security mechanism for Com component calls from .net seems to be changed
with this version resp. seems to be more restricted. If you use 1.1 it should all be fine
and the only possible thing you have to change is to set the machine.config
process model settings to system.

At least if you want to build an OpenDocument spreadsheet file you can also use
my AODL library. It will be easy to create a spreadsheet document from your
DataSet. At least the library doesn't need an OpenOffice installation which will also
save a lot off process overhead. Here you will find a code snippet about creating a
new Spreadsheet document and how to add a new table to it.

http://opendocument4all.com/content/view/101/45/

You can download the latest version of the library here:
http://opendocument4all.com/content/view/103/49/

Cheers,
LarsB
_________________
AODC - A free OpenDocument Converter
AODL - An independent OpenDocument Library C#
EmbeddedOpenOffice .net UserControl C#
EmbeddedOpenOffice Visual Studio .net Add In

http://www.OpenDocument4all.com/
Back to top
View user's profile Send private message Visit poster's website
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 12:49 pm    Post subject: Reply with quote

Lars

I was hoping to get you to reply.. Yes I am using .net 2.0 (Framework I am assuming you mean right)? Forgive me, I am in a huge learning curve right now... Let me take a look at your links...

I have changed what you suggested and yes, just hangs where I stated... Will I not be able to acomplish this with 2.0?

Jay
Back to top
View user's profile Send private message
LarsB
OOo Advocate
OOo Advocate


Joined: 31 Aug 2005
Posts: 445
Location: Hamburg, Germany

PostPosted: Mon Feb 13, 2006 1:00 pm    Post subject: No way Reply with quote

Hi Jay,

no way. I have heard about a small sum of solutions with .net 2.0 where the process
wouldn't hang on the bootstrap call, but no one of these was a ASP.net solution.
So I think it wouldn't work. At the moment I'm realy busy by developing the OpenDocument
implemenation and so I don't find the time to determine where the bootstrap
trouble occour exactly. If I found the time and find it out I will of course post it here
and on my website. I would suggest you should change to the 1.1 version or
as I mentioned use AODL. This will help you to save a lot of deveopment time.

Cheers,
LarsB
_________________
AODC - A free OpenDocument Converter
AODL - An independent OpenDocument Library C#
EmbeddedOpenOffice .net UserControl C#
EmbeddedOpenOffice Visual Studio .net Add In

http://www.OpenDocument4all.com/
Back to top
View user's profile Send private message Visit poster's website
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 1:09 pm    Post subject: Reply with quote

Ok, Thanks Lars.. Can you just help me with a few instructions with your AODL..? It wil work with 2.0 from what I am gathering from your statement. I downloaded it. Extracted it to a directory. Added the AODL.dll to a Bin folder in my Asp app??? Do I need to now add a "Using" reference to the .dll.. Just a few instructions on how to set it up would be cool.. I didn't find that in the .chm files.. Unless I over looked it...

thanks. Don't mean to keep you from your great work...
Jay
Back to top
View user's profile Send private message
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 1:55 pm    Post subject: Reply with quote

Lars

Will your AODL create a speadsheet format that can be opened up with MS Excel?
Back to top
View user's profile Send private message
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 2:32 pm    Post subject: Reply with quote

I got the using in and only stuck now on the spreadsheetDocument.SaveTo(AARunMeFirstAndOnce.outPutFolder+"simple.ods");
Back to top
View user's profile Send private message
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 2:38 pm    Post subject: Reply with quote

Now I have the save also.. Had to add the other .dll.. Laughing

I will start to play with this.. Thanks much...
Back to top
View user's profile Send private message
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Mon Feb 13, 2006 2:41 pm    Post subject: Reply with quote

Lars...

Sorry.. I keep replying to myself, but each time it is because I have resolved my own issue. However, I did post a question to you I would like to get an answer to if possible. Will your AODL library export or convert the output to a format that MS Excel can open? If not, then this may all be for not for me.. All my users have MS Excel, I wanted to avoid getting a license for our server...

Thanks
Jay
Back to top
View user's profile Send private message
LarsB
OOo Advocate
OOo Advocate


Joined: 31 Aug 2005
Posts: 445
Location: Hamburg, Germany

PostPosted: Mon Feb 13, 2006 9:35 pm    Post subject: Not yet Reply with quote

Hi Jay,

up to now there isn't a import support for Excel. The excel format is a binary
format and very complex. I plan to support to import and export of excel documents,
but first I will finishing the OpenDocument implementation.

Cheers,
LarsB
_________________
AODC - A free OpenDocument Converter
AODL - An independent OpenDocument Library C#
EmbeddedOpenOffice .net UserControl C#
EmbeddedOpenOffice Visual Studio .net Add In

http://www.OpenDocument4all.com/
Back to top
View user's profile Send private message Visit poster's website
jschevy01
General User
General User


Joined: 13 Feb 2006
Posts: 8
Location: US

PostPosted: Tue Feb 14, 2006 5:12 am    Post subject: Reply with quote

Lars...

Thanks for the help and the Libraries.. I will hang onto them, as they still may come in handy for me for other things...Keep up the great work...

Jay
Back to top
View user's profile Send private message
jjgiopa
Newbie
Newbie


Joined: 08 Mar 2006
Posts: 4
Location: Pisa, Italy

PostPosted: Wed Mar 22, 2006 1:55 am    Post subject: Reply with quote

Hy !
I'm writing a ASP.NET appliction using OO to convert odt into pdf. I've use a oo basic macro called via shell and works fine on winXP-iis5, but I've a problem with win2003-ii6.

my question is :
is possible invoke a macro not via shell, perhaps using cli_uno or AODL ?
or have you some advice to configure iis6 to execute correctly oo via shell ?

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