rtf to text convert of tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm converting thousands of resports from rtf to text using a utility
rtf2text. If they have tables they data extraced from them is not lining up
at all. Is there any way I can improve the look of this? Eg after trf
convert:
BMD T SCORE Z SCORE CHANGE
LUMBAR SPINE 0.983 -0.6 0.7 -3.9%
LEFT HIP 0.950 0.1 0.9 -8.1%
LEFT FOREARM 0.521 -0.9 0.4

Would like it to look like this:
BMD T SCORE Z SCORE CHANGE
LUMBAR SPINE 0.983 -0.6 0.7 -3.9%
LEFT HIP 0.950 0.1 0.9 -8.1%
LEFT FOREARM 0.521 -0.9 0.4
 
You need a second step in your conversion: deal with the tabular data. If
the tables are all as simple as your example, it would be sufficient to
insert tabs and define the style with a set of right-tab positions.
 
You need a second step in your conversion: deal with the tabular data. If
the tables are all as simple as your example, it would be sufficient to
insert tabs and define the style with a set of right-tab positions.
 
How would I do that? After the rtf conversion, how can it know where to put
tabs? Or would I have to do each manually?
Thanks!
 
How would I do that? After the rtf conversion, how can it know where to put
tabs? Or would I have to do each manually?
Thanks!
 
If the tables contain matchable patterns of characters, you can use Find and
Replace. In your example, you could search for 'any sequence of uppercase
letters and spaces, followed by three groups of digits possibly with periods
and signs' and insert tabs before the digit groups. Do a Google on using
'regular expressions' with Word's Find and Replace.
 
If the tables contain matchable patterns of characters, you can use Find and
Replace. In your example, you could search for 'any sequence of uppercase
letters and spaces, followed by three groups of digits possibly with periods
and signs' and insert tabs before the digit groups. Do a Google on using
'regular expressions' with Word's Find and Replace.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top