Skip to content

Commit 38cb77e

Browse files
Fix set HyperlinkValue in poi/xssf/ExcelCells.cs
1 parent b2465cb commit 38cb77e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dotnet/src/dotnetframework/GxOffice/poi/xssf/ExcelCells.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,12 @@ public bool SetHyperlink(string value)
185185
{
186186
for (int i = 1; i <= cellCount; i++)
187187
{
188-
pCells[i].Hyperlink.Address = value;
188+
var hyperlink = pWorkbook.GetCreationHelper().CreateHyperlink(HyperlinkType.Url);
189+
hyperlink.Address = value;
190+
191+
pCells[i].Hyperlink = hyperlink;
189192
}
193+
190194
return true;
191195
}
192196
catch (Exception)

0 commit comments

Comments
 (0)