Word 2010 problem: convert text to table

User avatar
John Gray
PlatinumLounger
Posts: 5415
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Word 2010 problem: convert text to table

Post by John Gray »

I have some text in a monospaced font which I want to convert to a table - but there is no delimiting character (tab, say) between the columns, just an arbitrary number of blanks. The start of each column lines up nicely, as you can see.

For example, I want to convert this:

Code: Select all

Column 1     column 2     column 3
Row 2        more row 2   yet more row 2
to a 3-column by 2-row table.

I've tried the suggested 'drawing boxes' method but I can't get it to work.
I could type a # at the front of each text segment, but in practice I have about 9 columns by 30 rows, and that's too tedious. And I have to repeat the same thing every so often.

Any spectacularly simple ideas, please?!
John Gray

"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Word 2010 problem: convert text to table

Post by Rudi »

Have you tried importing it into Excel using the text import wizard? You can use fixed width to split the text. Once in Excel, use trim to clean spaces, copy and paste into Word. Paste an Excel cell selection usually pastes as a table.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
DaveA
GoldLounger
Posts: 2599
Joined: 24 Jan 2010, 15:26
Location: Olympia, WA

Re: Word 2010 problem: convert text to table

Post by DaveA »

I have use Find and Replace 2-3 spaces with a tab.
Then the 2 or more tabs can be replaced by one tab.

You may end up with a few extra spaces, they should be abled to replace out with nothing.

Find a good number that takes care of most of the spaces, which just may be 5 or more.
I am so far behind, I think I am First :evilgrin:
Genealogy....confusing the dead and annoying the living

User avatar
John Gray
PlatinumLounger
Posts: 5415
Joined: 24 Jan 2010, 08:33
Location: A cathedral city in England

Re: Word 2010 problem: convert text to table

Post by John Gray »

Thanks for those ideas!

Rudi: unfortunately I didn't get the text import wizard, and everything came into Column A. Might look at this idea more when I get some time.
Dave: that is a fairly good solution, less tedious than my idea of prefixing fields with a #.
John Gray

"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...

User avatar
HansV
Administrator
Posts: 78589
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Word 2010 problem: convert text to table

Post by HansV »

Select the text in column A in the Excel sheet, then activate the Data tab of the ribbon and click Text to Columns in the Data Tools group.
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Word 2010 problem: convert text to table

Post by Rudi »

Hi John,

As Hans has pointed out, the Text Import Wizard is actually one and the same to the Text to Columns feature on the Data tab. However, this tool should activate when you import a text file from the same Data tab and click the button, "From Text".
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.