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

Can I SetCellHyperLink in stream mode? #1489

Open
eaglexiang opened this issue Mar 9, 2023 · 2 comments
Open

Can I SetCellHyperLink in stream mode? #1489

eaglexiang opened this issue Mar 9, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@eaglexiang
Copy link
Contributor

Description
We learned DONT use File method and StreamWriter at same time. Now we need to set cell hyper link, could excelize add support of StreamWriter.SetCellHyperLink? Thanks!

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Output of go version:

(paste your output here)

Excelize version or commit ID:

(paste here)

Environment details (OS, Microsoft Excel™ version, physical, etc.):

@xuri xuri added the enhancement New feature or request label Mar 9, 2023
@haivp3010
Copy link

At the moment, one workaround for this is to use the HYPERLINK function and set it inside the Formula field.
For example

data := []interface{}{
  excelize.Cell{Formula: `=HYPERLINK("https://localhost", "https://localhost")`},
}
sw.SetRow("A1", data)

@Denvormine
Copy link

Moreover excel has a hard limit for not-formula-hyperlinks that equals 65530 links per worksheet. So it might be better to use hyperlink as formula while writing via stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants