Closed yeleibo closed 8 months ago
I have the same error.
`[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Unsupported operation: Cannot remove from an unmodifiable list
... `
I'm seeking advice on whether there's a workaround I can implement, or if this is an issue that needs resolution within the package itself. This functionality is crucial to my application, and any guidance or assistance you can provide would be greatly appreciated.
Thank you for your efforts in maintaining this package!
The only solution I came with at the moment is to not rename or delete any sheet, which is a pity because I used this to remove the default Sheet1 and now its there.
This is really bad, I need to be able to rename the default sheet or delete it.
I'm having the same issue, can't delete the sheet created by default
Hey there! I stumbled upon the same issue. As a workaround you can wrap the function in a try-catch block, it's temporary but might help you too!
excel.setDefaultSheet can be used as workaround for avoiding Sheet1
Great workarounds by @ksh-b and @eapCJ . Thank you!
This is strange, it wasn't an issue before. I've been using version 2.1.0 and haven't upgraded dart or flutter either, but now I'm suddenly getting this error.
Downgrade is not helping me out. I' getting this error as well with version 3.0.0
and even 2.1.0
as well.
The error is coming from used package archive
. One fix is to use latest main branch and the newly added deleteFile function.
Link to pull request: https://github.com/justkawal/excel/pull/314
Until this is resolved, I was able to fix this by setting the version of archive in my own project's pubspec to 3.4.9
. Hope this helps someone
@mtcahill57 it didn't work for me
@maboumra Hmm, I am able to use it properly. My project's pubspec looks like this:
archive: 3.4.9
excel: any
then I ran flutter clean; flutter pub get
I had the same issue, However, I upgraded to version 4.0.2 from version 2... something I'm not sure about anymore, however, I never had Archive installed, and once I added it manually it fixed the issue. Is there a chance it's a new dependency that's not auto-installed when upgrading?
error info :Cannot remove from an unmodifiable list