Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Hyperlinks not working #690

Closed
tonyqus opened this issue Nov 11, 2021 Discussed in #689 · 0 comments · Fixed by #1128
Closed

Remove Hyperlinks not working #690

tonyqus opened this issue Nov 11, 2021 Discussed in #689 · 0 comments · Fixed by #1128

Comments

@tonyqus
Copy link
Member

tonyqus commented Nov 11, 2021

Discussed in #689

Originally posted by alexandretperez November 12, 2021
Hi all,

I'm trying to remove an hyperlink from a cell using the below code:

public void RemoveLink()
{
	var filePath = @"C:\Temp\Book1.xlsx";
	
	var workbook = WorkbookFactory.Create(filePath);
	var address = new CellReference("A1");
        var sheet = workbook.GetSheet("Sheet1");
	var cell = sheet.GetRow(address.Row).GetCell(address.Col);
	
	((XSSFSheet)sheet).RemoveHyperlink(address.Row, address.Col);

	using (var fs = File.Open(filePath, FileMode.Create, FileAccess.Write))
		workbook.Write(fs);
}

But nothing happens, the hyperlink is still there.

Am I missing something?

@tonyqus tonyqus added this to the NPOI 2.5.6 milestone Dec 11, 2021
@tonyqus tonyqus added the xlsx label Feb 14, 2022
@tonyqus tonyqus modified the milestones: NPOI 2.6.0, NPOI 2.6.1 Jul 11, 2022
@tonyqus tonyqus modified the milestones: NPOI 2.6.1, NPOI 2.6.2 Jun 8, 2023
Bykiev added a commit to Bykiev/npoi that referenced this issue Jul 25, 2023
This PR closes nissl-lab#690

Unfortunately, I was unable to create a test (help is welcome)
@tonyqus tonyqus modified the milestones: NPOI 2.7.0, NPOI 2.6.2 Aug 23, 2023
tonyqus pushed a commit that referenced this issue Aug 23, 2023
This PR closes #690

Unfortunately, I was unable to create a test (help is welcome)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant