ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Import structured data from Word (https://www.excelbanter.com/excel-programming/346387-import-structured-data-word.html)

mag7417[_2_]

Import structured data from Word
 

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


--
mag7417
------------------------------------------------------------------------
mag7417's Profile: http://www.excelforum.com/member.php...o&userid=28413
View this thread: http://www.excelforum.com/showthread...hreadid=487541


Ed

Import structured data from Word
 
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

"mag7417" wrote in
message ...

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


--
mag7417
------------------------------------------------------------------------
mag7417's Profile:

http://www.excelforum.com/member.php...o&userid=28413
View this thread: http://www.excelforum.com/showthread...hreadid=487541





All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com