Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert .odt .doc .ods files to .txt files

I want to convert all the .odt .doc .xls .pdf files to .txt files.

I want to convert these files to text files using a shell script or a perl script

like image 999
Akhtar Avatar asked Oct 14 '09 03:10

Akhtar


People also ask

Can I open a ODT file in Google Docs?

Google docs does indeed open . odt files. I just checked that function. I start from Google Drive, right click, open with, Google docs.

How do I change a TXT file to doc?

To change into Word format, you can open the existing text file in either Wordpad or Word program by Pressing CTRL+O and browsing to the folder where text file is. Select it and open it. After opening, Save As *. docx to convert into Word format.


3 Answers

There's a program for odt files and alikes:

odt2txt - avaliable in repos.

like image 60
naugtur Avatar answered Oct 01 '22 08:10

naugtur


$ unoconv --format=txt document1.odt

Should produce document1.txt.

like image 38
CW Holeman II Avatar answered Oct 01 '22 07:10

CW Holeman II


OpenOffice has a built-in document converter capable of handling a bunch of formats- take a look at unoconv: http://dag.wieers.com/home-made/unoconv/

That being said, I have had some troubles getting that to work in the past- If you're having trouble, take a look at similar programs for AbiWord (another open source word processor).

like image 38
igul222 Avatar answered Oct 01 '22 08:10

igul222