+ Reply to Thread
Results 1 to 10 of 10

copy tables from word into excel, without merging cells

  1. #1
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Cool copy tables from word into excel, without merging cells

    Hi guys,


    I have a word document with a table 3 columns and many rows, some of the rows have multiple lines in them, using enter and ctrl enter.
    When I copy and paste the table into excel, all the columns line up. However the rows do funny things like merge 2 rows together if the word document had any Ctrl+Enters within a table cell.


    I need a way that will copy a table from word to excel without merging cells. I would imagine excel would use the "Alt+Enter" (new line within same cell) instead of putting information on the next row, and merging other rows.

    Thanks guys
    Jimmy

  2. #2
    Forum Contributor
    Join Date
    11-10-2017
    Location
    INDIA
    MS-Off Ver
    365
    Posts
    184

    Re: copy tables from word into excel, without merging cells

    Hi Jimmy,

    Its not the complex task, just you need to take care of the table selected in Word while copying, It would be better to enclose the sample file to see the issue.

  3. #3
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Re: copy tables from word into excel, without merging cells

    Quote Originally Posted by Sunny18pc View Post
    ...sample file to see the issue.
    See attached
    Example.docx


    Try copying and pasting either table into excel and they both end up all weird. Any help would be greatly appreciated.

  4. #4
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Re: copy tables from word into excel, without merging cells

    *Bumping this thread*

  5. #5
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: copy tables from word into excel, without merging cells

    Hi,

    I downloaded your word file and copied the tables into excel, unchecked "Wrap Text" option first selecting the whole data range, adjusted the column width and applied the "Wrap Text" again.

    See the attached file. Is this not what you get when you paste the word file that you posted into excel in your computer?
    Attached Files Attached Files

  6. #6
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,835

    Re: copy tables from word into excel, without merging cells

    The problem with what you're trying to do is that the table cells contain paragraph breaks and line breaks. Excel can't handle these as part of a single cell's pasted content from Word. Hence the use of a separate row for each paragraph and the merging of cells in adjoining columns.

    A workaround is to use Find/Replace in Word to replace those paragraph breaks and line breaks with some other temporary character (e.g. ASCII 182 = ¶), do the paste, then replace those temporary characters in Excel with line breaks (ASCII 10).
    Last edited by macropod; 11-15-2017 at 02:51 AM.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  7. #7
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Re: copy tables from word into excel, without merging cells

    Quote Originally Posted by cbatrody View Post
    Hi,

    I downloaded your word file and copied the tables into excel, unchecked "Wrap Text" option first selecting the whole data range, adjusted the column width and applied the "Wrap Text" again.

    See the attached file. Is this not what you get when you paste the word file that you posted into excel in your computer?
    Your attached file is what I get when I copy and paste; not correct formatting.

  8. #8
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Re: copy tables from word into excel, without merging cells

    Quote Originally Posted by macropod View Post
    The problem with what you're trying to do is that the table cells contain paragraph breaks and line breaks. Excel can't handle these as part of a single cell's pasted content from Word. Hence the use of a separate row for each paragraph and the merging of cells in adjoining columns.

    A workaround is to use Find/Replace in Word to replace those paragraph breaks and line breaks with some other temporary character (e.g. ASCII 182 = ¶), do the paste, then replace those temporary characters in Excel with line breaks (ASCII 10).
    Works pretty well. can't believe I didn't try that..

    I'm using ^p in find and replace.
    How do I take care of the "Shift+ Enter" the same way in word?

  9. #9
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,835

    Re: copy tables from word into excel, without merging cells

    Quote Originally Posted by JimmyWilliams View Post
    I'm using ^p in find and replace.
    How do I take care of the "Shift+ Enter" the same way in word?
    Use ^l as the Find expression.

  10. #10
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    405

    Re: copy tables from word into excel, without merging cells

    Quote Originally Posted by macropod View Post
    Use ^l as the Find expression.
    That might just do it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 4
    Last Post: 01-25-2015, 01:35 PM
  2. Macro to copy data within excel into tables in a word document
    By tanweercwa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-14-2013, 07:50 AM
  3. [SOLVED] Copy excel sheets to Word Tables
    By oneillp1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2013, 12:00 PM
  4. Copy charts from excel to word - specific tables
    By h0ps in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2012, 05:32 AM
  5. Copy Word tables to Excel
    By Don in forum Excel General
    Replies: 3
    Last Post: 02-13-2005, 01:08 PM
  6. Merging cells in Word Table from Excel
    By Ex949 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2005, 03:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1