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

delete sheet1 #315

Closed
esingulten opened this issue Jan 21, 2024 · 5 comments
Closed

delete sheet1 #315

esingulten opened this issue Jan 21, 2024 · 5 comments

Comments

@esingulten
Copy link

Hello dear developer, in the previous version, sheet1 was automatically created, and I used to delete sheet1. Now it's automatically created again, but I can't delete it. I get the following error:

UnmodifiableListMixin.removeWhere (dart:_internal/list.dart:139:5)
E/flutter (8393): #1 Excel.delete (package:excel/src/excel.dart:279:22)

@SebKister
Copy link

Issue seems to be with
_archive.files.removeWhere((file) { return file.name.toLowerCase() == _xmlSheetId[sheet]?.toLowerCase(); });
_archive.files is an UnmodifiableListView

@amedeop
Copy link

amedeop commented Jan 29, 2024

You cannot even rename it: you get the same error.

var defaultSheet = excel.getDefaultSheet() ?? "Sheet1";
excel.rename(defaultSheet, "NewSheetName");
Error: Unsupported operation: Cannot remove from an unmodifiable list
This is a bit strange

@lexxxel
Copy link

lexxxel commented Jan 29, 2024

Duplicate of #309 (comment)

Have you searched the existing issues, before creating this one?

@houdayec
Copy link

houdayec commented Feb 1, 2024

#309

Check this fix:

#309 (comment)

@eduardofcr
Copy link

same issue here

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

7 participants