Link to home
Start Free TrialLog in
Avatar of viki2000
viki2000Flag for Germany

asked on

Excel to Word - Export table content

Hi,
I have the attached 2 files.
I need to export the content from Excel to Word and maintain the same format.
The table from Word file is important as format, because will be printed at that exact dimension.
Copy/Paste with all possible formats offered by Paste in Word does not help me too much.
On the current computer I have only Office 2013.
In the table from Word I need the 2 rows in one cell without an empty line between them, as it happens when I use Paste in Word.
Is it any simple automated solution to do what I want?
Export Word.xlsx
Import Excel.docx
Avatar of viki2000
viki2000
Flag of Germany image

ASKER

In mean time I fund next suitable method, but if you have further suggestions I gladly want to try them out.
  1. I copy the Excel range/table and I paste it into an empty Word file with Paste – Use Destination Style.
  2. I click on Show/Hide paragraph marks symbols (the pilcrow symbol ¶)
  3. I use next steps: https://texthandler.com/info/remove-line-breaks-word/
Only that instead of ^p^p, I actually use ^l^l and replace all with “===”
  1. Then I copy the content of the above Word table into my original formatted Word table with Paste – Overwrite Cells.
hi viki2000,
If you want to automate this conversion from Excel table to Word format, you can use VBA to solve it.

Here is the link to guide you further for the setup:
https://www.groovypost.com/howto/insert-excel-table-into-word-with-vba/
if all you are trying to do is replace the new line (^l^l) with a new paragraph (^p), then in a blank document:
  1. I copy the Excel range/table and I paste it into an empty Word file with Paste – Use Destination Style.
  2. I click on Show/Hide paragraph marks symbols (the pilcrow symbol ¶)
then replace ^l^l with ^p...

you can skip all the other steps

@David H.H.Lee 
I have read all the links about VBA and paste Excel table into Word before I asked here, but some that I have tried did not work for me. About VBA approach I was aware, but it did not work well for me.
The problem is solved "manually".

@Paul Sauvé 
What I tried is to replace 2x ^l^l  with 1x ^l
But actually that emplacement is only part of the problem, the simplest one.
The Excel table contents must be imported into a Word Table, but the Word Table is an already made empty table. The Word Table is made with Labels function in Word and has precise length and height, because will be printed and cut as labels.
When I import from Excel into Word, then Word wants to makes its own table format in order to maintain the Excel format. That is wrong. It does not want to import/paste with destination format of the Labels Table from Word.
Basically I made 2 steps: One time importing From Excel into Word as a new Word table, then I applied "replace 2x ^l^l  with 1x ^l" and second importing againg from Word New table into the Word Labels table.

How can be this automated with VBA it does not seem easy.
Hi viki2000,
Do you might to share more details(eg: error message) for us to understand further in VBA approach challenges?
when you copy from one Word table to another, the number of columns in both tables must be exactly the same.

let me try a bit more to see if i can arrive at a reasonable solution
i did it by following your steps (Copy from Excel to Word, replace  ^l^l  with "=== "  then  "=== " with ^l ), then copying 5 columns wide into the formatted Word table

but your excel table is actually 17 columns by 32 rows, so a considerable amount of work & wasted labels is involved
Import-Excel_test.docx
Well, the work is done now.
Paul, the point is to print the labels with info from Excel in that Excel format.
I did not care about the number so rows and columns, just put the info from Excel into Word to be printed out.
I dot want to waste any label, so if new arrangements or permutations must be done, then it will be fine.
The point is how to make all these in fewer steps, more a kind of automation.
ASKER CERTIFIED SOLUTION
Avatar of Paul Sauvé
Paul Sauvé
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I guess that is so far as we can go for now.
The problem is solved and I do not have to do it again anyway, neither as a repeated task.