Pasting HTML without Hyperlinks

by Allen Wyatt
(last updated May 16, 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, and 2013.

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. ...


Keyboard Shortcut to Access Header and Footer

Some folks like to avoid using the mouse whenever possible, preferring to leave their hands on the keyboard. If you are ...

Discover More

Ignoring Hyphens in Word Counts

When you instruct Word to tell you how many words are in a document, it treats hyphenated words or phrases as if they are ...

Discover More

Determining the Current Directory

When creating macros, it is often necessary to know which directory is the default. Here's how you can find out by using ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

Specifying a Browser in a Hyperlink

Excel allows you to easily add hyperlinks to a worksheet. Click on it, and the target of the link is opened in a browser ...

Discover More

Creating a Dynamic Hyperlink

Want to create a hyperlink that will always display a different worksheet in your workbook? There are several ways to do ...

Discover More

Using Drag-and-Drop to Create a Hyperlink

If you open workbooks in two instances of Excel, you can use drag-and-drop techniques to create hyperlinks from one ...

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 + 7?

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.