Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Tables / January 2008

Tip: Looking for answers? Try searching our database.

Converting ASCII tables to Word tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert Morley - 20 Jan 2008 23:56 GMT
Is there an easy way to convert an ASCII table to a Word table in Word XP?
I've found that interestingly enough, if I hit Enter at the end of an ASCII
table line, Word will insert a Word table with all the same column
divisions, properly aligned with the previous ASCII text row, but despite
that capability, it appears to be unable to actually convert from an ASCII
table to a Word table directly.

If it makes a difference, in this case, the ASCII table format is:

+-------+-------+
| Col 1 | Col 2 |
+-------+-------+
| Text  | Text  |
+-------+-------+

Doing a Convert Table to Text with | as the delimiter does a partial job,
but I'm hoping there's some better way of doing it than that.

Thanks,
Rob
Suzanne S. Barnhill - 21 Jan 2008 00:11 GMT
What's happening when you press Enter at the end of an ASCII row is based on
your settings wrt "Apply as you type: Tables" on the AutoFormat As You Type
tab of Tools | AutoCorrect Options. Unfortunately, the AutoFormat tab
doesn't include "tables" as an option, so AFAIK, there is no way to
accomplish what you want other than row by row.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

> Is there an easy way to convert an ASCII table to a Word table in Word XP?
> I've found that interestingly enough, if I hit Enter at the end of an
[quoted text clipped - 16 lines]
> Thanks,
> Rob
Robert Morley - 21 Jan 2008 06:01 GMT
Thanks Suzanne.  I hadn't clued into the fact that that was coming from
AutoFormat As You Type, though I hadn't really thought about it either.  I'm
not entirely surprised that there's no facility to convert an ASCII table to
a Word table.

I suppose I could always make a macro in VBA...just ignore the +---+ lines
and parse the pipe-delimited lines.  It's not a big project I'm working on,
so I'll think about it and decide later. :)

Rob

> What's happening when you press Enter at the end of an ASCII row is based on
> your settings wrt "Apply as you type: Tables" on the AutoFormat As You Type
> tab of Tools | AutoCorrect Options. Unfortunately, the AutoFormat tab
> doesn't include "tables" as an option, so AFAIK, there is no way to
> accomplish what you want other than row by row.
Suzanne S. Barnhill - 21 Jan 2008 06:05 GMT
Shouldn't even require VBA. Use Find and Replace to replace the +---+ lines
with nothing, then use Table | Convert | Text to Table separating at <pipe>.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

> Thanks Suzanne.  I hadn't clued into the fact that that was coming from
> AutoFormat As You Type, though I hadn't really thought about it either.
[quoted text clipped - 12 lines]
>> tab doesn't include "tables" as an option, so AFAIK, there is no way to
>> accomplish what you want other than row by row.
Robert Morley - 21 Jan 2008 06:16 GMT
Yeah, I've tried that, and it works to some degree, but it's a
less-than-perfect solution since it has no ability to merge multiple
consecutive piped lines into a single row, and also leaves a lot of spaces
in the table.

Rob

> Shouldn't even require VBA. Use Find and Replace to replace the +---+ lines
> with nothing, then use Table | Convert | Text to Table separating at <pipe>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.