Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Error opening the file after copying worksheet and copying ranges #32

Closed
rashuf opened this issue Oct 17, 2017 · 4 comments
Closed

Error opening the file after copying worksheet and copying ranges #32

rashuf opened this issue Oct 17, 2017 · 4 comments

Comments

@rashuf
Copy link

rashuf commented Oct 17, 2017

Error opening the file after copying worksheet and copying ranges
Hello!
I found some problem whit coping ranges. Problem is:

  1. I copy worksheet
  2. I copy ranges from one worksheet to copied worksheet.

If in copied ranges have merged cells, when I open the file in Excel, Excel tells me
"Excel found unreadable content in sample1_copied.xlsx. Do you want to recover the contents of this workbook?
If you trust the source of this workbook,
click Yes."

After I click Yes, I see message "Removed Records: Merge cells from /xl/worksheets/sheet2.xml part" (v. 4.5.0)
and also "Removed Records: Shared formula from /xl/worksheets/sheet2.xml part" (v. 4.1.1)
Test code: Sample1_copyWorksheet
Source/input file: sample.xlsx
Result/output file: sample1_copied.xlsx

PS: if I run the method package.save and reopen the file between copying worksheet and ranges, it works.
Sample1_CopyWorksheet.zip

JanKallman added a commit that referenced this issue Nov 10, 2017
…lti-targeting project for .Net 3.5, Net 4.0 and .Net Core 2.0 and automatic nuget package build. Added new property for Compatibility.IsWorksheets1Based in ExcelPackage, so the Worksheets collection can be zero based as expected. This will be default in .Net Core. The property can be set from the app.config file or the appsettings.json in .Net Core.
JanKallman added a commit that referenced this issue Nov 10, 2017
…lti-targeting project for .Net 3.5, Net 4.0 and .Net Core 2.0 and automatic nuget package build. Added new property for Compatibility.IsWorksheets1Based in ExcelPackage, so the Worksheets collection can be zero based as expected. This will be default in .Net Core. The property can be set from the app.config file or the appsettings.json in .Net Core.
@JanKallman
Copy link
Owner

Fixed in. 4.5.1

@Techiedotnet
Copy link

I am getting this error in version : 4.5.1.0 ,v4.0.30319 : v4.0.30319. I am trying to fill the excel sheet (using template), getting error while opening the file. Thanks.

@DiogoMoreira0610
Copy link

I'm getting same error on v4.3.5. Can you help?

@melkor54248
Copy link

Same for me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants