| [reply] |
| [reply] |
Yes martin i posted the question but no reply.
| [reply] |
Hi
The example at OpenOffice::UNO which u mentioned is compleatly useless. I understood nothing.
What I would need is a real example which uses OpenOffice::UNO to open a Word-document and saves it as odt-document.
If anyone could post such code this would be really cool!!
Alex
| [reply] |
sUrl="file:///myhome/documents/source.sxw"
oDocument=oDesktop.loadComponentFromURL(sUrl,"_blank",0,DimArray())
Dim args(0) as new com.sun.star.beans.PropertyValue
args(0).Name = "FilterName"
args(0).Value = "writer_pdf_Export"
destination = "file:///myhome/documents/test.pdf"
odocument.storeToURL(destination,args())
oDocument.close(true)
grep writer_pdf_Export -r OpenOffice-UNO-0.06
http://cpansearch.perl.org/src/MBARBON/OpenOffice-UNO-0.06/t/14.t
http://perluno.cvs.sourceforge.net/viewvc/perluno/perluno/examples/DocumentSaver/
http://perluno.cvs.sourceforge.net/viewvc/perluno/perluno/examples/DocumentConverter/
| [reply] [d/l] |
There still is no Perl module written to read the various MS Word formats on CPAN, but OLE::Storage has an example script that extracts text from MS Word 6/7/8 files, so OLE::Storage should be able to read MS Word files, but maybe not on that high level that OpenOffice::OODoc offers. The newer OLE::Storage_Lite should also be able to read MS Word files. There is also a module that can WRITE MS Word files (Win32::Word::Writer), but it depends on OLE and an installed MS Word. Newer MS Office versions (starting at Office 2003) write ZIP-compressed XML files for at least Word, Excel, and Powerpoint. You just have to unzip the *.docx file and parse the XML file it contains, very similar to what OpenOffice::OODoc does. See also Re: Excel 2007 Support.
Alexander
--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
| [reply] |