Linked Excel Table in Word from absolute ref to range ref

Anonymous
2020-06-11T18:36:46+00:00

I need to switch a linked spreadsheet embed from using reference to using a range to specify the region.

I have a spreadsheet table that will change size and content (nothing fast, maybe weekly changes) I would like to make sure that when the table is updated in size (new rows/removed rows), the word documents embed also is changed in size and content.

I currently have a link set up by copying the current table to the clip board, then special pasting ("Paste link", Excel) I get the following as the embedded code when I do alt+F9,

{ LINK Excel.Sheet.12 C:\PowerQueryLink.xlsx Desktop!R1C1:R7C3 \a \p }

The sheet name is "Desktop". The Table name is "Desktop_Query".

I have tried editing it to be 

{ LINK Excel.Sheet.12 C:\PowerQueryLink.xlsx Desktop!Desktop_Query \a \p }

But get the error "Word is unable to create a link to the object you specified. Please insert the object directly into your file without creating a link." 

I have tried the object path (insert -> text -> Object) but that does not let me select the table or sheet I want it to pull from. I have tried special pasting using "Paste" not "Paste link", but that does not allow the data to be updated from the original sheet.

I need the area to expand and contract when the spreadsheet table changes size.

Thanks,

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Anonymous
    2020-06-11T21:35:38+00:00

    Hi Darrick,

    In the Excel workbook, you may navigate to the Formulas menu, click Define Name, input a new name, and select the range of the table behind the Refers to option, OK. After that, you may use the defined name in the embedded code in the Word document and check the results.

    Per my tests, you may need to manually Update Link for the first time after updating the code, later changes made in the Excel workbook will be automatically updated to the document.

    Best Regards,

    Hugo

    3 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Paul Edstein 82,826 Reputation points Volunteer Moderator
    2020-06-11T23:16:55+00:00

    Based on what you have described, your link should be expressed as:

    {LINK Excel.Sheet.12 "C:\PowerQueryLink.xlsx" "Desktop!Desktop_Query" \a \p}

    Note: If you name the range before copying & pasting the entire named range, Word will automatically use the range name instead of the cell ranges.

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2020-06-12T13:10:54+00:00

    Thank you so much! I did not know that a table was different from a range.

    0 comments No comments