질문하기

dave_BLT's profile - activity

2016-12-14 00:25:05 +0200 받은 배지  유명한 질문 (source)
2016-10-27 13:44:42 +0200 받은 배지  주목할 만한 질문 (source)
2016-10-27 02:42:29 +0200 받은 배지  인기있는 질문 (source)
2016-10-26 00:38:05 +0200 받은 배지  조력자 (source)
2016-10-26 00:37:47 +0200 코멘트달린 답변 Saving xlsx file causes corruption

Permit me a newbie question... Where should I go to remove those references? Somehow the documentation seems to only say how to add rather than modify the definitions. Thanks very much for your help. Edit: Sorry I was typing this comment in between when you were typing yours. I'll try with Excel.

2016-10-26 00:16:38 +0200 코멘트달린 답변 Saving xlsx file causes corruption

Just to clarify, the Before was generated in Excel by our colleague. I used LibreOffice to edit and save the document. And correct, do not want those references to old workbook. I guess I'm not sure if you're saying that the cause of the error within EPPlus?

2016-10-25 22:28:47 +0200 질문에 댓글을 달았습니다 Saving xlsx file causes corruption

Thanks @mark_t! Here are links to the Before and After workbooks.

My Workbook: Before

My Workbook: After

Also the error from MS Excel reads: We found a problem with some content in 'MyWorkbook_After.xlsx'.Do you want us to try to recover as much as we can? If you trust the source of this workbook, click Yes. After that, it does open.

2016-10-25 21:59:09 +0200 받은 배지  학생 (source)
2016-10-25 19:43:39 +0200 받은 배지  편집자 (source)
2016-10-25 19:40:15 +0200 질문하였습니다 Saving xlsx file causes corruption

We've consistently been having trouble with LibreOffice Calc when modifying a workbook which we use for onboarding clients. Our internal tool uses EPPlus to read the file and generate user profiles. If I open the file in LibreOffice, make a change, and save the file, our internal tool throws an exception (see below). MS Excel also complains about the file after saving from LibreOffice, but does at least open it.

Can anyone offer any advice, or if a modification needs to be made to LibreOffice? I am not able to attach files to this post because I don't have enough points. :/

Please note that we do not use EPPlus for modifying the workbook -- that is not the source of the error.

If no changes are made, EPPlus accepts the file just fine.
If changes are made with MS Excel, EPPlus accepts the file just fine.

I am using LibreOffice 5.2.2.2 (x64) on Windows 10 version 1607, build 14393.321, but we have seen it occur in multiple other versions of LibreOffice and Windows.

System.ArgumentException was unhandled HResult=-2147024809 Message=An item with the same key has already been added. Source=mscorlib StackTrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at OfficeOpenXml.ExcelNamedRangeCollection.AddName(String Name, ExcelNamedRange item) at OfficeOpenXml.ExcelNamedRangeCollection.Add(String Name, ExcelRangeBase Range) at OfficeOpenXml.ExcelWorkbook.GetDefinedNames() at OfficeOpenXml.ExcelPackage.get_Workbook() at WorkbookImporter.Program.Main(String[] args) in C:\git\MediView\Utilities\WorkbookImporter\Program.cs:line 51 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: