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

Discuss the word processor
Post Reply
eikelein
Posts: 5
Joined: Wed Nov 28, 2007 1:17 pm
Location: WI, USA

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

Post by eikelein »

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
User avatar
Hagar Delest
Moderator
Posts: 32657
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

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

Post by Hagar Delest »

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.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

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

Post by acknak »

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.
AOO4/LO5 • Linux • Fedora 23
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

Post by eikelein »

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?
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

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

Post by TerryE »

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.
Bill
Volunteer
Posts: 8933
Joined: Sat Nov 24, 2007 6:48 am

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

Post by Bill »

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.
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

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

Post by acknak »

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.
AOO4/LO5 • Linux • Fedora 23
greendragonflyz
Posts: 1
Joined: Sun Jun 26, 2011 5:10 am

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

Post by greendragonflyz »

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.*
Post Reply