Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default CONVERTING MS WORD FORMATTED DATA INTO EXCEL WORKSHEET

Hi
I have some data entered in MS word (Office XP) in tabular form(formatted
data) using tables. This data have to be copied in MS excel worksheet and
then sorted based on few columns. Can anyone suggest methods to do this.

Since copying/pasting each row of a table in MS word on to a row in MS excel
is time consuming.

--
reply to my posts are welcome
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default CONVERTING MS WORD FORMATTED DATA INTO EXCEL WORKSHEET

It depends on how often you need to perform this task if it is worth writing
a macro. You can open a word application from excel VBA. Then you can find
each table in the word document and copy all the data from each table into
excel. It get more complicated if you want to only copy some of the rows
from some of the tables.

You can same the word document as text files and then have excel open the
text files and read the data. Again it depends how much of the text you need
to read in excel how complicated the macro is going to be.

"NSNR" wrote:

Hi
I have some data entered in MS word (Office XP) in tabular form(formatted
data) using tables. This data have to be copied in MS excel worksheet and
then sorted based on few columns. Can anyone suggest methods to do this.

Since copying/pasting each row of a table in MS word on to a row in MS excel
is time consuming.

--
reply to my posts are welcome

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 20
Default CONVERTING MS WORD FORMATTED DATA INTO EXCEL WORKSHEET

This task we do very often. The document of 5 to 10 pages contains bill of
quantities of materials used for manufacturing a product. In word we create
a table having rows and columns. each columns represents a parameter of a
item. I wish to retain these data with the same columns in MS excel
worksheet.

NSNRao
--
reply to my posts are welcome


"Joel" wrote:

It depends on how often you need to perform this task if it is worth writing
a macro. You can open a word application from excel VBA. Then you can find
each table in the word document and copy all the data from each table into
excel. It get more complicated if you want to only copy some of the rows
from some of the tables.

You can same the word document as text files and then have excel open the
text files and read the data. Again it depends how much of the text you need
to read in excel how complicated the macro is going to be.

"NSNR" wrote:

Hi
I have some data entered in MS word (Office XP) in tabular form(formatted
data) using tables. This data have to be copied in MS excel worksheet and
then sorted based on few columns. Can anyone suggest methods to do this.

Since copying/pasting each row of a table in MS word on to a row in MS excel
is time consuming.

--
reply to my posts are welcome

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default CONVERTING MS WORD FORMATTED DATA INTO EXCEL WORKSHEET

I had a sample of a word table macro at home and I was at work. This should
get you started. The code will get every table from the word document and
place the results in consecutive rows in Excel. The code gets the text
without any formating.

Sub Test()
Set ExSht = ActiveSheet
'
FName = "c:\temp\abc.doc"
WordWasRunning = True

On Error Resume Next
Set WDApp = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set WDApp = CreateObject("Word.Application")
WordWasRunning = False
End If

WDApp.Visible = True 'at least for testing!

Set WDDoc = WDApp.documents.Open(Filename:=FName)
RowCount = 1
For Each Table In WDDoc.tables
For Each rw In Table.Rows
ColCount = 1
For Each Cell In rw.Cells

Set rngtext = Cell.Range
rngtext.MoveEnd Unit:=wdCharacter, Count:=-1
ExSht.Cells(RowCount, ColCount) = rngtext
ColCount = ColCount + 1
Next Cell
RowCount = RowCount + 1
Next rw
Next Table
Set WordTable = WDDoc.tables(1)
WDDoc.Close
WDApp.Quit
End Sub


"NSNR" wrote:

This task we do very often. The document of 5 to 10 pages contains bill of
quantities of materials used for manufacturing a product. In word we create
a table having rows and columns. each columns represents a parameter of a
item. I wish to retain these data with the same columns in MS excel
worksheet.

NSNRao
--
reply to my posts are welcome


"Joel" wrote:

It depends on how often you need to perform this task if it is worth writing
a macro. You can open a word application from excel VBA. Then you can find
each table in the word document and copy all the data from each table into
excel. It get more complicated if you want to only copy some of the rows
from some of the tables.

You can same the word document as text files and then have excel open the
text files and read the data. Again it depends how much of the text you need
to read in excel how complicated the macro is going to be.

"NSNR" wrote:

Hi
I have some data entered in MS word (Office XP) in tabular form(formatted
data) using tables. This data have to be copied in MS excel worksheet and
then sorted based on few columns. Can anyone suggest methods to do this.

Since copying/pasting each row of a table in MS word on to a row in MS excel
is time consuming.

--
reply to my posts are welcome

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some cells can't be formatted after converting from Quattro Pro. slock@muccipac Excel Worksheet Functions 2 February 15th 11 10:32 PM
Converting time-formatted to text-based data Zakynthos Excel Discussion (Misc queries) 2 November 11th 08 04:41 PM
Converting formatted text into a txt file Marc Excel Discussion (Misc queries) 1 June 21st 07 04:00 PM
converting a number to time formatted as minutes JR Excel Worksheet Functions 2 February 9th 06 07:31 PM
Converting 'General' formatted cells to Text formatted cell using. Zahid Khan Excel Worksheet Functions 1 March 12th 05 07:13 PM


All times are GMT +1. The time now is 01:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"