How to convert .doc/.odt to .csv or Calc format

Discuss the word processor

How to convert .doc/.odt to .csv or Calc format

Postby eikelein » Sun Jan 20, 2008 5:19 pm

Hello;
I am a bloody beginner :oops: with OO running 2.3.1 on WinXP Home SP2 (fully up to date).
My searching in the forums and the Help system was fruitless so far. I am sure that I either overlook the obvious or others may have had the same question and I don't find the solution (my choice if search arguments often is poor, I'm not a native English speaker).

My "problem": I have quite a few (important) addresses of customers in M$ Word and/or .odt format. The files are Tab separated columns like Firstname, Lastname and so on. I easily can store the data as text files Tab separated or in the respective internal Table formats. For further processing like changing column sequence, sorting by different column(s) and so on I want to load the contents into OO Calc.

Any pointers to existing solutions, the Help system or the like would be greatly appreciated.

TIA
eikelein
 
Posts: 5
Joined: Wed Nov 28, 2007 1:17 pm
Location: WI, USA

Re: How to convert .doc/.odt to .csv or Calc format

Postby Hagar Delest » Sun Jan 20, 2008 10:00 pm

See that thread: [Solved] Opening a text file in Calc.

Thanks to add '[Solved]' in your first post title (edit button) if your issue has been fixed.
AOO 4.0.1 on Windows 7 and Xubuntu 14.04 (Trusty Tahr)
User avatar
Hagar Delest
Moderator
 
Posts: 25113
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: How to convert .doc/.odt to .csv or Calc format

Postby acknak » Mon Jan 21, 2008 2:08 am

See that thread: [Solved] Opening a text file in Calc.

Oops: he came here from that thread ;-)

eikelein: You cannot, under any circumstances, open a .doc (MS Word) file in Calc.

If your data in the .doc file are indeed simply tab-separated text, just do this:
1) Open in Writer
2) Select all
3) Edit > Copy
4) File > New > Spreadsheet
5) Edit > Paste Special > Unformatted text

This will open the text import dialog window--select your separators, and OK.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17424
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to convert .doc/.odt to .csv or Calc format

Postby eikelein » Tue Jan 22, 2008 10:46 am

eikelein: You cannot, under any circumstances, open a .doc (MS Word) file in Calc.

If your data in the .doc file are indeed simply tab-separated text, just do this:
1) Open in Writer
2) Select all
3) Edit > Copy
4) File > New > Spreadsheet
5) Edit > Paste Special > Unformatted text

This will open the text import dialog window--select your separators, and OK.


acknak,
Thanks for the reply. I had tried that already but this gives every column, header AND data rows, vertically all in the first column. It looks like:
FirstName
LastName
Street
Ben
Sampler
123 Road

In the meantime I feel strongly that this is an IMHO major weakness in OO. Why in heaven is there NO WAY to save a text table as a .csv? Or to import tabular text into Calc? At least the latter ought to be possible if there were a distinction between field and record separators...

Hopeless?
eikelein
 
Posts: 5
Joined: Wed Nov 28, 2007 1:17 pm
Location: WI, USA

Re: How to convert .doc/.odt to .csv or Calc format

Postby TerryE » Tue Jan 22, 2008 3:07 pm

eikelein wrote:Why in heaven is there NO WAY to save a text table as a .csv? Or to import tabular text into Calc? At least the latter ought to be possible if there were a distinction between field and record separators... Hopeless?


Eikelein, you didn't follow Hagar's link in his first response. Of course you can import Tab separated and Comma separated data into calc — through the Insert->Sheet from File. OK, I agree that its a little convolved to open new workbook, insert the TSV sheet, then delete the first blank sheet, but it is still quite doable. You can also save plain sheets in CSV format through the File -> Save As menu.

As cut and paste of a table into a spreadsheet works fine for me. If you want to post an example then we'll have a look. A good way to sanitise a CSV file for test purposes is to open it in writer and to a replace (using regular expressions) of [b-z] for a.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
TerryE
 
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: How to convert .doc/.odt to .csv or Calc format

Postby Bill » Tue Jan 22, 2008 3:38 pm

eikelein wrote:
eikelein: You cannot, under any circumstances, open a .doc (MS Word) file in Calc.

If your data in the .doc file are indeed simply tab-separated text, just do this:
1) Open in Writer
2) Select all
3) Edit > Copy
4) File > New > Spreadsheet
5) Edit > Paste Special > Unformatted text

This will open the text import dialog window--select your separators, and OK.


acknak,
Thanks for the reply. I had tried that already but this gives every column, header AND data rows, vertically all in the first column. It looks like:
FirstName
LastName
Street
Ben
Sampler
123 Road

Are you working with a table or tab-separated values? When working with tab-separated values, acknak's method works for me. When working with a table, just copying the table and pasting directly into Calc works.

eikelein wrote:In the meantime I feel strongly that this is an IMHO major weakness in OO. Why in heaven is there NO WAY to save a text table as a .csv? Or to import tabular text into Calc? At least the latter ought to be possible if there were a distinction between field and record separators...

Hopeless?

What do you mean by "save a text table as a .csv"? Is your "text table" an actual table or tab-separated values? If you have tab-separated values, it is possible to save as .csv. If you have an actual table, you can convert it to text before saving as .csv.
Bill
 
Posts: 3324
Joined: Sat Nov 24, 2007 6:48 am

Re: How to convert .doc/.odt to .csv or Calc format

Postby acknak » Tue Jan 22, 2008 4:19 pm

Attach a sample of your data document here, or email it to me (see "Interests" in my profile). I'm sure it can be done, but it will be a long process trying to do it by trial and error like this.
AOO 4 • Linux • Fedora 17
User avatar
acknak
Moderator
 
Posts: 17424
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: How to convert .doc/.odt to .csv or Calc format

Postby greendragonflyz » Sun Jun 26, 2011 5:16 am

Thank you AckNack. Your reply from back in '08 worked just great today. Saving me hours and hours. I'm a smilin'.
OO v 3.0.1 on OSX 10.5.8.
OpenOffice 3.* on OSX 10.5.*
greendragonflyz
 
Posts: 1
Joined: Sun Jun 26, 2011 5:10 am


Return to Writer

Who is online

Users browsing this forum: No registered users and 16 guests