| View previous topic :: View next topic |
| Author |
Message |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 11:51 am Post subject: OpenOffice With Asp.Net |
|
|
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 |
|
 |
LarsB OOo Advocate


Joined: 31 Aug 2005 Posts: 445 Location: Hamburg, Germany
|
Posted: Mon Feb 13, 2006 12:41 pm Post subject: Which .net version |
|
|
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 |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 12:49 pm Post subject: |
|
|
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 |
|
 |
LarsB OOo Advocate


Joined: 31 Aug 2005 Posts: 445 Location: Hamburg, Germany
|
Posted: Mon Feb 13, 2006 1:00 pm Post subject: No way |
|
|
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 |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 1:09 pm Post subject: |
|
|
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 |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 1:55 pm Post subject: |
|
|
Lars
Will your AODL create a speadsheet format that can be opened up with MS Excel? |
|
| Back to top |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 2:32 pm Post subject: |
|
|
| I got the using in and only stuck now on the spreadsheetDocument.SaveTo(AARunMeFirstAndOnce.outPutFolder+"simple.ods"); |
|
| Back to top |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 2:38 pm Post subject: |
|
|
Now I have the save also.. Had to add the other .dll..
I will start to play with this.. Thanks much... |
|
| Back to top |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Mon Feb 13, 2006 2:41 pm Post subject: |
|
|
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 |
|
 |
LarsB OOo Advocate


Joined: 31 Aug 2005 Posts: 445 Location: Hamburg, Germany
|
Posted: Mon Feb 13, 2006 9:35 pm Post subject: Not yet |
|
|
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 |
|
 |
jschevy01 General User

Joined: 13 Feb 2006 Posts: 8 Location: US
|
Posted: Tue Feb 14, 2006 5:12 am Post subject: |
|
|
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 |
|
 |
jjgiopa Newbie

Joined: 08 Mar 2006 Posts: 4 Location: Pisa, Italy
|
Posted: Wed Mar 22, 2006 1:55 am Post subject: |
|
|
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 |
|
 |
|