openoffice.org

How does Open Office compress its files?

孤人 提交于 2019-11-30 05:16:13
I'm trying to create an Open Office spreadsheet programmatically but for some reason simply compressing a folder with all the necessary files makes Open Office flag the file as corrupted. How did I get to this? I started by creating a normal spreadsheet in Open Office with some values in it. After saving I change the extension to .zip and make a copy of the folder. I then compress the second folder using command line zip and change the file extension to .ods. When trying to open the resulting file I get an error from Open Office saying the file is corrupt. Does Open Office use a special

How to create an update query with Open Office Base?

╄→гoц情女王★ 提交于 2019-11-29 18:12:21
I want to create basically an update query on Open Office Base (the same way with Ms ACCESS). Jim K Base does not typically use update queries (but see below). Instead, the easiest way to do an update command is to go to Tools -> SQL. Enter something similar to the following, then press Execute : UPDATE "Table1" SET "Value" = 'BBB' WHERE ID = 0 The other way is to run the command with a macro. Here is an example using Basic: Sub UpdateSQL REM Run an SQL command on a table in LibreOffice Base Context = CreateUnoService("com.sun.star.sdb.DatabaseContext") databaseURLOrRegisteredName = "file:///C

How do I convert RTF to PDF from my PHP web page using OpenOffice?

梦想的初衷 提交于 2019-11-29 16:45:29
My OS is Windows XP, and I'm using IIS 5.1 and PHP 5.2.9. I'm trying to call a PHP script from my PHP page in order to convert an RTF doc to a PDF, using OpenOffice. The script works just fine when I call it directly from the command line, but I'm not having any success getting the very same script to work when launched from my PHP web page. When I call the script from my PHP page, the page hangs, eventually showing an error, and I've noted that I can see in the Task Manager where the soffice.bin and soffice.exe processes are running under my IIS user name. This is the error: Fatal error:

How to create .odt files with C#.NET?

半世苍凉 提交于 2019-11-29 14:38:25
问题 Note: I found this "Creating a Word Doc in C#.NET", but that is not what I want. Do you know how to create a .odt to create file from C# .NET? Is there a .NET component or wrapper for an OpenOffice.org library to do this? 回答1: Have a look at AODL (see http://odftoolkit.org/projects/odftoolkit/pages/AODL). fully managed .NET 1.1 (so it runs on MS.Net and Mono) support for text and spreadsheet documents create, read, edit, save documents ... EDIT by kame: New link AODL-Wiki 回答2: You can check

How to Search and Replace in odt Open Office document?

人走茶凉 提交于 2019-11-29 07:33:11
In my Delphi application I am currently do Search&Replace programmatically for doc and docx word documents using office ole automation. Does anyone has the code to do the same (for doc, docs, odt) in OpenOffice? I also asked a related question on saving to pdf . You should take a focus on XReplaceable interface. Here is the example. Please note, that there's no error handling. I've tested it with LibreOffice writer and it works fine for me. uses ComObj; procedure OpenOfficeReplace(const AFileURL: string; ASearch: string; const AReplace: string); var StarOffice: Variant; StarDesktop: Variant;

OpenOffice and .NET

别来无恙 提交于 2019-11-29 06:51:23
问题 Is there a .NET API for OpenOffice? EDIT: Is there a OpenOffice SDK for .NET? 回答1: Novel has a branch of OOo that adds mono capabilities, so you can use these builds for scripting via .Net inside OOo. The document formats for OOo (except for Base) is XML + resources in a zip container. If you need programmatic access beyond manual file manipulation, your best bet is to use the ActiveX control with COM Interop. If you want to use Base as a datasource in .Net, it is near impossible, as it's an

Problems with office automation in asp.net. I can use alternatives such as open-office, if I knew how

余生长醉 提交于 2019-11-29 04:51:41
I have a ASP.NET 2.0 web application that should upload a ppt file and then extract its slides to images. For that I have imported office.dll and Microsoft.Office.Interop.PowerPoint.dll assemblies and wrote the following code public static int ExtractImages(string ppt, string targetPath, int width, int height) { var pptApplication = new ApplicationClass(); var pptPresentation = pptApplication.Presentations.Open(ppt, MsoTriState.msoTrue, MsoTriState.msoFalse, MsoTriState.msoFalse); var slides = new List<string>(); for (var i = 1; i <= pptPresentation.Slides.Count; i++) { var target = string

How does Open Office compress its files?

情到浓时终转凉″ 提交于 2019-11-29 02:53:24
问题 I'm trying to create an Open Office spreadsheet programmatically but for some reason simply compressing a folder with all the necessary files makes Open Office flag the file as corrupted. How did I get to this? I started by creating a normal spreadsheet in Open Office with some values in it. After saving I change the extension to .zip and make a copy of the folder. I then compress the second folder using command line zip and change the file extension to .ods. When trying to open the resulting

Uncompress OpenOffice files for better storage in version control

时光怂恿深爱的人放手 提交于 2019-11-28 23:22:37
I've heard discussion about how OpenOffice (ODF) files are compressed zip files of XML and other data. So making a tiny change to the file can potentially totally change the data, so delta compression doesn't work well in version control systems. I've done basic testing on an OpenOffice file, unzipping it and then rezipping it with zero compression. I used the Linux zip utility for my testing. OpenOffice will still happily open it. So I'm wondering if it's worth developing a small utility to run on ODF files each time just before I commit to version control. Any thoughts on this idea? Possible

Add space between every letter

旧街凉风 提交于 2019-11-28 21:25:29
How can I add spaces between every character or symbol within a UTF-8 document? E.g. 123hello! becomes 1 2 3 h e l l o ! . I have BASH , OpenOffice.org , and gedit , if any of those can do that. I don't care if it sometimes leaves extra spaces in places (e.g. 2 or 3 spaces in a single place is no problem). sed(1) can do this: $ sed -e 's/\(.\)/\1 /g' < /etc/passwd r o o t : x : 0 : 0 : r o o t : / r o o t : / b i n / b a s h d a e m o n : x : 1 : 1 : d a e m o n : / u s r / s b i n : / b i n / s h It works well on e.g. UTF-8 encoded Japanese content: $ file japanese japanese: UTF-8 Unicode