Hyperlinks - How to remove them. #689
Replies: 3 comments 1 reply
-
At first glance, this looks to be a bug |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @tonyqus One last comment, the issue seems to happen only with XLSX files indeed. public void RemoveLink(string ext)
{
var filePath = @"C:\Users\833741\Downloads\Book." + ext;
var workbook = WorkbookFactory.Create(filePath);
var address = new CellReference("A1");
var sheet = workbook.GetSheet("Sheet1");
if (ext == "xls")
((HSSFCell)sheet.GetRow(address.Row).GetCell(address.Col)).RemoveHyperlink(); // this one is working fine. (xls)
else
((XSSFCell)sheet.GetRow(address.Row).GetCell(address.Col)).RemoveHyperlink(); // trying this way also does not work. (xlsx).
using (var fs = File.Open(filePath, FileMode.Create, FileAccess.Write))
workbook.Write(fs);
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
This issue is fixed in #690 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm trying to remove an hyperlink from a cell using the below code:
But nothing happens, the hyperlink is still there.
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions