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

Hyperlink in the new sheet, not available in google drive #1244

Closed
cvzm opened this issue Jun 9, 2022 · 2 comments
Closed

Hyperlink in the new sheet, not available in google drive #1244

cvzm opened this issue Jun 9, 2022 · 2 comments
Labels
confirmed This issue can be reproduced
Projects

Comments

@cvzm
Copy link

cvzm commented Jun 9, 2022

Description
Creating a hyperlink in the default sheet1 and uploading it to google drive works normally, but the hyperlink of the new sheet cannot be used.

Steps to reproduce the issue:

file := excelize.NewFile()
sheet = "Sheet2"
file.NewSheet(sheet)
file.SetCellValue(sheet, "A1", "test link")
file.SetCellHyperLink(sheet, "A1", "https://google.com", "External") 
file.SaveAs("test.xlsx")

Describe the results you received:
Hyperlinks in Sheet2, are not recognized in google.
But local can work normally

Describe the results you expected:
It is hoped that hyperlinks can be identified normally in google drive.

In addition, I found a solution in disguise, using CopySheet().
new sheet copied through sheet1 can work properly in google.

Output of go version:

go version go1.16.6 darwin/amd64

Excelize version or commit ID:

version 2.6.0

Environment details (OS, Microsoft Excel™ version, physical, etc.):
MacOS: WPS, Google Drive

@xuri
Copy link
Member

xuri commented Jun 9, 2022

Thanks for your issue. Google Sheets currently have a compatibility issue currently with the XML namespace which contains relationships in markup compatibility ignorable: mc:Ignorable="r", it can be skip at the internal function addNameSpaces, but I don't suggest made change for this currently for it maybe cause unstable compatibility impact.

@xuri xuri added the confirmed This issue can be reproduced label Jun 9, 2022
@xuri xuri closed this as completed in 551fb8a Aug 13, 2022
@xuri
Copy link
Member

xuri commented Aug 13, 2022

This issue has been fixed, please upgrade to the master branch code, and this patch will be released in the next version.

@xuri xuri added this to Compatibility in v2.6.1 Aug 13, 2022
rodoard pushed a commit to sheetrocks/excelize that referenced this issue Aug 26, 2022
…bility with Google Sheet

- Format code with `gofmt`
xuri added a commit to carbin-gun/excelize that referenced this issue Oct 9, 2022
…bility with Google Sheet

- Format code with `gofmt`
xuri added a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
…bility with Google Sheet

- Format code with `gofmt`
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…bility with Google Sheet

- Format code with `gofmt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
No open projects
v2.6.1
Compatibility
Development

No branches or pull requests

2 participants