Microsoft Office 2007 came out about a year ago. Have you yet started getting .docx, .xlsx, or .pptx files? Whether you are an OpenOffice.org user or a Microsoft Office 2003 user, you are probably frustrated trying to find some way to convert, import, or otherwise open these documents.
These new document formats are called Office Open XML, OOXML, or OpenXML. They are significantly different from the Microsoft Office 97, 2000, 2003, or XP formats. The new formats are based on XML while the old formats are binary.
If you don't use Linux or you are afraid of the terminal, skip to the very end. Otherwise here is one easy way to convert these documents thanks to Novell. They developed a tool called the OpenOffice OpenXML Translator, and soon it will be fully integrated into the mainstream OpenOffice.org.
Because this procedure is for the command line (and does not directly integrate into the vanilla OpenOffice.org), this procedure is well suited for automated, batch conversions between OpenXML and OpenDocument Format. This procedure should work on all Linux distributions: Ubuntu, Fedora, SUSE, Mandriva, Debian, and so on.
Installation prerequisites
Install the programs rpm2cpio and cpio. If you run a system such as Fedora, run this command:
sudo yum -y install cpio rpm
If you run Ubuntu, run this command:
sudo apt-get install rpm libgif4
Installation procedure
The general idea is the same no matter which Linux distribution you use. You are basically copying one file out of the RPM as if it were a tarball or a zip file. You are not installing the RPM in the traditional sense, so don't worry if you run a non-RPM-based system such as Ubuntu, Debian, or Slackware
- Download odf-converter-1.1-7.i586.rpm for i386 systems or odf-converter-1.1-7.x86_64.rpm for x86_64 systems.
- Open a console.
- Change directory to your download directory. Depending on your setup, it may be:
cd ~/Desktop - To unpackage the rpm, run this command:
rpm2cpio odf-converter*rpm | cpio -ivd - To copy the binary run this command:
sudo cp usr/lib/ooo-2.0/program/OdfConverter /usr/bin - Optionally you may now delete the opt and usr directories you just unpacked as well as the .rpm file you downloaded. However, you may wish to keep the files under usr if you are interested in documentation and sample OpenXML documents.
Usage
The usage is simple. To convert a .docx file (Word 2007) to a .odt (OpenDocument Format) file, just run:
OdfConverter /i example.docx
Then, you will find the .odt file in the same directory as the .docx. Then, open the ODF file in OpenOffice.org or your favorite office suite.
For more help on arguments, just run OdfConverter without arguments. If you are curious, there are some OpenXML sample documents included in the RPM: check the directory usr/share/doc/packages/odf-converter/.
Related articles
- odf-converter-integrator use odf-converter easily with any version of OpenOffice.org (no command line). Also contains the latest version of OdfConverter.
- Install Free Office 2007 Fonts for Linux and XP
- OxygenOffice as a Word 2007 .docx converter
- Office Compatibility Pack Review
- Convert OpenXML documents in Windows using command line using odf-converter
- Review: Zamzar .docx to .odt Converter
- odf-converter 1.1 released
- Review: docx2rtf Document Converter
Comments
You're welcome!
Thanks!!
OdfConverter: error while loading shared libraries: libgif.so.4: cannot open shared object file: No such file or directory
Thoughts?
Here is the command (which you can enter in a terminal) to find which package you need:
sudo yum whatprovides libgif.so
Here is how to install the necessary package:
sudo yum install giflib
Andrew
OdfConverter: error while loading shared libraries: libtiff.so.3: cannot open shared object file: No such file or directory
how can i resolve this?
many thanks!!
by running "locate libtiff.so" I found that i have libtiff.so.4
so i made a symbolic link with
"sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3"
then a bit of "sudo ldconfig" to update the library cache and bob is now my uncle
i'd love to take credit for that bit of wisdom but i actually found it here:
http://linux.derkeiler.com/Mailing-Lists/Ubuntu/2006-04/msg02897.html
thanks for the guide, it's a real treat
2006-04/msg02897.html
bash: /usr/bin/OdfConverter: cannot execute binary file
any help?
it's great to be able to find whatever you want in linux.
Linux forever
rpm2cpio odf-converter-*.i586.rpm | bunzip2 - | cpio -ivd
Debian 4.0
This worked fine on Fedora 8 and default OpenOffice.
I had to 'rpm -i --nodeps odf-convertor...' because it complained about openoffice not being > 2.0 (which it is: 2.3)
Thanks, it was a big help.
translated.
Hello, I wrote a ODT file, containing enumerated list, tables colors and mathematical formula. I converted it to docx format.
- I could not open that file with the Oygen Openoffice which contains a docx import filter, files corrupted.
- converted the docx file back to odt, but then the math formula were gone.
can anybody comment on this?
One suggestion to make it easier. If you prefer GUI rather than CLI you can right-click on a docx file and say "open with" then choose custom command. For the custom command type "OdfConverter /i" After that you can go to properties of any docx file and go to the "Open With" tab and choose OdfConverter as the default program. From now on, when you click to open a docx it will not open it but will instead spit out a odt file in the same directory which you can open. This works well in Gnome/Nautilus. I am sure the instructions are slightly different in KDE/Konqueror.
I get
error: Failed dependencies:
OpenOffice_org >= 2.0 is needed by odf-converter-1.1-7.i586
libgif.so.4 is needed by odf-converter-1.1-7.i586
OO is installed, just has a different package name. Same with libgif, since libgif.so.4 is present in the /usr/lib directory.
If I install with nodeps I get
/var/tmp/rpm-tmp.6321: line 22: SuSEconfig: command not found
When it finishes there is no file called OdfConverter installed in /usr/bin.
1. save the following as $HOME/.kde/share/apps/
konqueror/servicemenus/
convertmsXMLtoodt.desktop
#Word XML>Openoffice.odt
[Desktop Entry]
ServiceTypes=application/mswordXML
Actions=docx2odt
[Desktop Action docx2odt]
Name=Convert XML to Openoffice .odt
Icon=doc
Exec=Odfconverter /i %f
2. create an application/mswordXML mimetype by
Control Center -> KDE Components -> File Associations -> Add... Group = applications, Type Name = mswordXML, Filename Patterns = *docx
I am able to convert pptx into odp's but the output is not good enough i.e. in lots of slides TEXT in the slide is getting clipped.
So is OdfCoverter somehow dependent on OpenOffice i.e. some schema files, it looks for in oo installation directory?
Thanks!
bhups: odf-converter is completely independent of OpenOffice.org, and you can use odf-converter if OpenOffice.org is never installed. Check odf-converter on how to report a bug
Tried with SuSe 10.1
I need them as concole apps on linux server whitout oo.org installed.
Thanks for any help!
http://odf-converter.sourceforge.net/
Though oddly enough the same version of OO in Windows won't open the file(?!) o_O
You can also get something similar for Windows from Go-oo.org, but on all my systems I use the vanilla edition.
Last time I checked about six months ago, the odf-converter and odf-converter-integrator had a higher quality of conversion than Ubuntu (which was a backport of the OOo 3.0 alpha code).
in case you get the libgif.so.4 message: you need giflib
Health Insurance Quotes
sudo ln -s libtiff.so.4 libtiff.so.3
OdfConverter works
Work nice!
Adi
Does anyone know a command line tool for converting xlsx to csv (the file has more rows than OOCalc can handle)?
I was wondering about a xsl translation kit for OOXML...
From a gmail account, attach the docx file and send it to yourself or to another gmail account.
When you receive it you can view it as html, then just copy and paste.
It's not perfect, you'll have to do some ironing out of the format, but I found it much easier than trying to install programs & dependencies etc.
P.S. After this process send an email to the eedjit who sent you the docx telling them how irritating it is!
No problems on Fedora 8
All the best,
Mihai
thankyou
saved my day actually
Usage: anytopdf <infile> <outfile.pdf>
I just visted that side:
anytopdf has no download candidate
Uwe Brauer
btw. it's not a very good idea to make link from libtiff.so.3 to libtiff.so.4. you better download, and build the libtiff3 package. it's not in Ubuntu packages anymore, but it is here:
ftp://ftp.remotesensing.org/pub/libtiff/
also you may want to replace the link to odfconverter above that points to that specific version with a link pointing to download directory... there is a new version from April laying around.
http://download.go-oo.org/red-carpet/ooo-680/sled-10-sp-i586/
Upload the file into Googlem Docs...and download it in the format you wish to...
I appreciate your work sir, i just mensioned an even easy method for " those who are afraid of command line..."
Keep your works on...
Take Care
Sumit Asok
http://sumitasok.wordpress.com
ftp://ftp.remotesensing.org/pub/libtiff/
http://download.go-oo.org/red-carpet/ooo-680/
Is any other link available to download the same?
I already downloaded the rpm using the below link
I searched it in the below link.
http://katana.oooninja.com/w/odf-converter-integrator/download
Any help appreciated
$ rpm2cpio odf-converter-1.1-7.i586.rpm | cpio -ivd
argument is not an RPM package
cpio: premature end of archive
1. sudo apt-get install rpm libgif4
2. wget http://download.go-oo.org/tstnvl/odf-converter/builds/4.0-rc2/odf-converter-4.0-12.1.x86_64.rpm
3. rpm2cpio odf-converter*rpm | cpio -ivd
4. sudo cp usr/lib64/ooo-2.0/program/OdfConverter /usr/bin
5. sudo ln -s /usr/lib/libtiff.so.4 /usr/lib/libtiff.so.3
6. sudo ldconfig