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

Feature: Ignore macrosheet when calling UpdateLinkedValue() #1014

Closed
Ralim opened this issue Sep 4, 2021 · 1 comment
Closed

Feature: Ignore macrosheet when calling UpdateLinkedValue() #1014

Ralim opened this issue Sep 4, 2021 · 1 comment

Comments

@Ralim
Copy link

Ralim commented Sep 4, 2021

Description
I have a file that has a sheet that is a macrosheet instead of a normal sheet.
I don't need to edit this sheet at all, just have it be left-alone.

The current code throws an error when calling UpdateLinkedValue() as it cant parse this sheet.
xml decode error: expected element type <worksheet> but have <macrosheet>

Would love even if it would be possible to add this to the UpdateLinkedValue() call, like we do for chart sheets

if err.Error() == "xml decode error: expected element type <worksheet> but have <macrosheet>" {
     continue
}

Steps to reproduce the issue:

Can't currently publicly share the file sadly, but if desired can try and make a minimal example.

Describe the results you received:
xml decode error: expected element type <worksheet> but have <macrosheet>
Describe the results you expected:

No errors 😓

Output of go version:

go version go1.17 linux/amd64

Excelize version or commit ID:

v2 latest / a2d449708cf72928394b4bc4aea41c0c6a606fa2

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

Have been using this patch for now, and everything is working 😂
Ralim@83555e7

@xuri xuri closed this as completed in 684603b Sep 5, 2021
@xuri
Copy link
Member

xuri commented Sep 5, 2021

Thanks for your feedback. I have fixed this issue, please try to upgrade the master branch code

jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
- Fix formula percentages calculated incorrectly
- Make UpdateLinkedValue skip macro sheet
- Fix conditional format bottom N not working
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants