

Click the Home tab at the top of the window.If you only want to clear hyperlinks from a small subset of cells, then you can either manually select them by clicking your mouse on one and dragging it to select the rest, or you can select an entire row or column by clicking the row number or column letter. Click the button above the heading for row 1, and to the left of the heading for column A, to select the entire sheet.The hyperlink anchor text, however, will remain in the cell. This includes hyperlinks for Web pages, email addresses, or anything else which may have a hyperlink attached to it. Once you have completed this tutorial, all of the hyperlinks in your spreadsheet will be removed from the sheet. However, these same steps will also work in Microsoft Excel 2010. This tutorial was written using the 2013 version of Microsoft Excel. Fortunately Excel 2013 has a tool that allows you to remove hyperlinks from a selection of cells.Ĭlear All of the Hyperlinks in a Spreadsheet in Excel 2013 This means that the data will be underlined, and a hyperlink will be added to it that, when clicked, will open that Web page in your default Web browser.īut you may not like this behavior, and would instead prefer that the Web address be stored in the cell as regular data. Tc = crCell.createTextCursorByRange(l2.When you enter an address for a Web page into a cell in Microsoft Excel 2013, the program will automatically format that address as a hyperlink. REM Strange: As long as I look at l2 I can see the service TextField.URL for the TextField. If jTF.URL"" Then URLcount = URLcount + 1 Sub formatPreservingRemoveLinkageFromCellTextFieldURLContent(Optional pRgs) Having location=application the issue vanishes. Strangely the Sub works for me as expected also for cells containing more than one link and having differently attributed text portions if I start it from the IDE, but hangs if I call it via the UI. If the following macro is location=document: If l2.TextField.supportsService(".textfield.URL") Then

If IsMissing(pRgs) Then pRgs = ThisComponent.CurrentSelection Formatting of text portions not preserved. See yourself and post your better ideas: Sub removeLinkageFromCellTextFieldURLContentIgnorigPartialFormatting(Optional pRgs)
#How to remove hyperlink in excel column code#
To remove links (more than one per cell probably) from a cell preserving diffrent formatting of parts is rather complicated, and due to strange observations the code I ended up with may not be exactly reliable. It’s rather simple to “destroy” the links if partial formatting of cell texts is meaningless. However, I made a tour into the API, and have to admit that I didn’t find an easy way to do by user code for Calc what’s needed. One may be the fact that hyperlinks are very differently implemented in Calc and in Writer (e.g.) I cannot see the reasons for the delay with this obviously relevant feature.

tdf#66694 is more than 7 years old, and has a respectable ‘See also’. There surely are additional threads in the bug tracker. Quoting : “’…this inability to remove a hyperlink is a known bug.’ Link, please?”
