Excel formatting after saving

Even if I just download and save an existing Excel file (.xlsx), its format is corrupted. That's what I'm doing:

ExcelPackage pck = new ExcelPackage(fileInfo);
pck.SaveAs(newFile);

Any idea on how to keep the original formatting options of an Excel file modified through EPPlus?

UPDATE

This is the message that I see when opening a saved file:

enter image description here

Thanks at Advance

+4
source share
3 answers

What does "format corrupt" mean?

Your file may use some special features that are not fully supported by ExcelPackage. Especially if they come from the latest releases of Excel. Have you looked at the project page for them and in the list of problems?

, ExcelPackage , "EPPlus" - , , . ? : , , EPPlus, . , .

+1

, ( ) ( SaveFormat).

+1

, , . EPPlus Excel (xlsx). , .xls SaveAs. , Excel 2007 , , Excel 2003, Office Excel.

.xlsx:

FileInfo fileInfo = new FileInfo("jjjjjjj.xlsx");
0
source

Source: https://habr.com/ru/post/1532658/


All Articles