#1
|
|||
|
|||
Auto "import" data from word tables into excel
Hi guys,
(Sorry no native speaker here) I have got a large Excel-sheet and I always get 2 different word templates filled with data (depending on what amount of data is filled in the data mask, the resulting word-table has a different amount of rows and columns). For example: If someone filled in the field "Age" with 30, then in word it appers a row named Age: 30. Unfortunately, some of the fields are merged . For now I copy every single word table into excel and find the data via vlookup/index&match. After finishing one row I have to copy it and paste only the data without formulas and then I can continue and copy paste the next 2 word tables and so on... Since I am getting about 50-100 word tables every day I am looking for a more comfortable way to fill the data. Can I wirte some kind of macro that automatically finds the key words (like "Age") and imports the belonging data (like "30") into the wanted column in excel? Without me having to copy&paste every single word table and then replace the formula with text before copy&paste the next word table? I am really sorry but all of these data is hyper sensitive so I cant show you what I mean |
#2
|
||||
|
||||
While writing a macro to harvest data from Word documents is not difficult (see, for example: https://www.msofficeforums.com/word-...tml#post121223 & https://www.msofficeforums.com/word-...tml#post120046), without knowing what columns the data you want are in and whether it's those cells that might be merged, writing that part of the macro is reduced to guesswork. Surely you could provide a document showing just those parts of the tables from which the 'Age' data are required; no-one's privacy would be compromised by that!
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
The problem is that the actual table is more complicated and has more than 50 columns.. I think I am not able to write this macro on my own, but providing you dummy data isnt possible because I am not allowed to say anything - not even the name of the columns... All I can say is: it is about cars.
I think I have to continue with copy paste and hope that this work will be done in one or two years.... But thank you for trying to help. Maybe I am going to read the links you gave me and try a bit on my own when I have some time left. |
#4
|
||||
|
||||
Do be aware that a Word table cannot contain more than 63 columns. Even so, I suspect you'll have severe legibility issues long before you get to 50 columns.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Catalog Merge in Publisher error: "This data source contains no visible tables" | highroadnm | Publisher | 0 | 01-20-2018 02:35 PM |
ADODB import of Excel data results in "Run-time error -2147467259: <sheet> is not a valid name." | misaak | Excel Programming | 3 | 06-20-2016 07:55 AM |
Wierd... "cell" started auto filling with data from other cells I double click on. How stop it?! | KerryOn | Excel | 2 | 08-10-2015 08:41 PM |
Paste data in "Accounting"format from Excel into Word changes formatting | cory_0101 | Word | 4 | 10-17-2012 12:30 PM |
replace data from variable with "sub and super script" from excel to word by vba | krishnaoptif | Word VBA | 9 | 06-22-2012 05:08 AM |