Import structured data from Word

  • Thread starter Thread starter mag7417
  • Start date Start date
M

mag7417

Hi!

Does anyone know of a way to import srtuctured data from Word to Excel?
I have a 138 page Word document (that I can save as a text file to begin
with) that looks like this:

UL 1
sdjflkdjfklsdfjsdklfj

UL 2
dskfjkldfhjvnmsdff

UL 3
sdkfljlsdkfjsdklfjkf

That I want to import to Excel into the format:

The UL # I want in one column and the "hjkjfhkjsdfhks" in the next.

Is there an easy way to do this or can I write a script somehow that
can sllow me to do this?


Thanks in advance for the help!

Magnus
 
If the data is as regular as you put in your example, I would be tempted to
start from Word and export, rather than start from Excel and import. My
approach (and it may not be the best, mind you!) would be to:
Set a range in Word to cover your data
Create a new Excel workbook and set a range to Sheet 1, columns A and B
Set a counter "x" and initiate at 1
Find your UL#, set it into a string
Excel Range.Cells(x,1).Text = string
Find matching data, set into string
Excel Range.Cells(x,2).Text = string
x = x + 1
Lather, rinse, repeat

HTH
Ed
 

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