Pasting HTML without Hyperlinks

by Allen Wyatt
(last updated November 30, 2019)


When Ron copies a table from his company's website and pastes it into Excel, it takes a good 20 to 30 seconds to complete the paste operation, during which Ron cannot do anything else on his PC. The table is not large; only about 7 columns by 20 rows. It contains a mix of text and numbers, plus some hyperlinks. Ron thinks it may be the hyperlinks that slow down the pasting, as this long delay doesn't happen when performing a similar operation with other websites. Ron doesn't need the hyperlinks to be pasted, and using Paste Special with a non-HTML paste type doesn't provide satisfactory results. He wonders if there is a way (perhaps with a macro) to paste from the Clipboard in HTML format, but without the hyperlinks.

It could very well be that the problem is with the hyperlinks, but the reason that the hyperlinks are slowing it down may not be related to Excel. The first thing you'll want to check is with any third-party firewalls or anti-virus programs on your system. It is possible that they are intercepting the hyperlinks in the paste operation and checking each of them out before allowing the paste to complete. The only way to find out if that is the case is to disable the suspect program just before you do the paste (and you can enable it after the operation).

Within Excel, your options really are limited. You really only have the choices available under Paste Special to get the information into the worksheet. You may not like the way that the information appears if you paste in text format, but you might also try the Match Destination Formatting option to see if it provides more acceptable results.

Finally, it is possible that the culprit isn't the hyperlinks but is related to your workbook recalculating. If there are a lot of formulas and functions used throughout the workbook, pasting will trigger a recalculation of the entire workbook. You can figure out if this is the culprit by simply turning off automatic recalculation (use the Calculation Options tool on the Formulas tab of the ribbon) before doing your paste.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (7403) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Office 365.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...


Unwanted Styles

Want to get rid of some styles in a document that you don't need any more? It can be a difficult thing to do, unless you ...

Discover More

Deleting Old Data from a Worksheet

If you keep on-going data in a worksheet, some of your data�"over time�"may need to be deleted. If you have an ...

Discover More

Extracting E-mail Addresses from Hyperlinks

If you have a list of hyperlinked e-mail addresses in a worksheet, you may want to extract the addresses from those ...

Discover More

Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!

More ExcelTips (ribbon)

Pasting a Hyperlink

Need a quick link within a document to some external data? You can paste information so that Excel treats it just like a ...

Discover More

Hyperlink Doesn't Match Cell Contents

When you add a hyperlink to a worksheet, over time and after doing a bunch of editing, what you see in the cell can get ...

Discover More

Get Rid of Web Stuff

When you copy information from a Web page and paste it into a worksheet, you can end up with more than you bargained for. ...

Discover More

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 4 + 0?

2014-03-10 16:51:49

Mark D

if the issue is that the hyperlink is not wanted in the final version of the Excel file, I found by performing 1 "undo" after pasting (which creates the hyperlink with blue font) removes the linkange and the cell becomes text only. Though this does not address the speed by which the copy is executed, only replaces the hyperlink with text.

2014-03-03 13:09:41

Glenn Case

Another thing: I have tried this with Calculation turned off, with no effect on the slowdown. I have come to the conclusion that it is the hyperlinks causing the slowness.

I have seen this as well when just pasting a single internet hyperlink into a spreadsheet cell. Whenever I do this Excel hangs for several seconds. This behavior started when I switched from 2003 to 2010.

2014-03-03 13:05:22

Glenn Case

I have had similar problems, and in my case Pasting as text or copying to the notepad do not accomplish the needed effect because tables lose their formatting (i.e., instead of each number reading into a separate cell, they end up as a long string in a single cell.)

Pasting with NoHTMLFormatting = True will remove the HTML formats, but is still slow. If I do so, I will post results here.

I have not tried the method suggested by Bryan, but might try that when I get a chance.

2014-03-03 09:22:17


@ E. Veit: the description says Ron has the problem when he pastes something into Excel, so clearly your solution won't work if the first step is to paste into Excel. The problem isn't that he wants to remove the hyperlinks, but that he thought the hyperlinks were slowing him down.

@ Allen: would hyperlinks make a difference if automatic calculation were the culprit? If it ONLY slows down when Ron pastes from one website, then clearly automatic calculation can't be the problem here (unless each website gets pasted to different spreadsheets, but my interpretation of the --admittedly vague-- problem statement doesn't bring me to that conclusion).

If Ron determines that simply stripping out the hyperlinks but keeing the rest of the HTML is what he wants, he can use the code on this MSKB article combined with a clever Replace function:

Another solution might be to create a macro that formats the "paste as text" output to match what he needs.

2014-03-03 04:42:35

Rudra Sharma

Why not paste your data not notepad and paste it back to excel? This is very convenient.

With Regards

2014-03-02 20:02:23

E. Veit

What I do to avoid this problem is that I paste into a fresh Excel sheet, then I save it as a *.CSV which clears all formatting, links, icons etc. just like saving a Web-Site as *.txt does.
You have to save and close the file. It first appears with all the stuff you don't like to see.

That makes everything quite clean and it works as an Excel should.
Now I copy the data from the CSV in the Excel sheet where I want the data and apply the format I like with the format painter from a previous line or copy.

This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.