Hyperlinks - How to remove them. #689
Replies: 3 comments 1 reply
|
At first glance, this looks to be a bug |
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);
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions