Need a macro to copy tables from word to excel

Ak_Kmr

New Member
Joined
Oct 12, 2014
Messages
2
Hi All,

I need a macro which copies the table content from word(2013) to Excel (2013). For example say, my word tables are as follows:

ItemElectrical
NamePower chord
Number3249
Order No1-2998734
Sending detail1. Dispatched from local facility
2. Dispatched from remote facility
Expected Delivery1. Initially 3 days
2. Currently 1 day

<tbody>
</tbody>

ItemNon-Electrical
NameWood block
Number3250
Order No1-2998735
Sending detail1. Dispatched from facility1
2. Dispatched from facility2
3. Dispatched from facility2
Expected Delivery1. Initially 5 days
2. Currently 2 day

<tbody>
</tbody>


The output excel should be as follows:


[TABLE="width: 631"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Name[/TD]
[TD]Number[/TD]
[TD]Order No[/TD]
[TD]Sending Detail[/TD]
[TD]Expected delivery[/TD]
[/TR]
[TR]
[TD]Electrical[/TD]
[TD]Power chord[/TD]
[TD="align: right"]3249[/TD]
[TD]1-2998734[/TD]
[TD]Dispatched from local facility[/TD]
[TD]Initially 3 days[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Dispatched from remote facility[/TD]
[TD]Currently 1 day[/TD]
[/TR]
[TR]
[TD]Non-Electrical[/TD]
[TD]Wood block[/TD]
[TD="align: right"]3250[/TD]
[TD]1-2998735[/TD]
[TD]Dispatched from facility1[/TD]
[TD]Initially 5 days[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Dispatched from facility2[/TD]
[TD]Currently 2 day[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Dispatched from facility3[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

This macro should loop through all the tables in my word document and copy the tables to excel in the above mentioned manner. Appreciate your help here. Thanks.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,226,693
Messages
6,192,465
Members
453,725
Latest member
cvsdatreas

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top