On 'Save' delete the 'Drawings' object if it is either null or empty
diff --git a/EPPlus/ExcelWorksheet.cs b/EPPlus/ExcelWorksheet.cs index 81f5696..2d1371f 100644 --- a/EPPlus/ExcelWorksheet.cs +++ b/EPPlus/ExcelWorksheet.cs
@@ -2908,7 +2908,7 @@ } - if (Drawings.Count == 0) + if (!HasDrawings() || Drawings.Count == 0) { //Remove node if no drawings exists. DeleteNode("d:drawing"); @@ -4036,6 +4036,12 @@ return _drawings; } } + + public bool HasDrawings() + { + return (_drawings != null); + } + #endregion ExcelTableCollection _tables = null; /// <summary>
diff --git a/ReadMe_UpdatingEPPlus.txt b/ReadMe_UpdatingEPPlus.txt index 1c7524d..14bf447 100644 --- a/ReadMe_UpdatingEPPlus.txt +++ b/ReadMe_UpdatingEPPlus.txt
@@ -26,8 +26,8 @@ 2. Use Git to checkout branch AppSheet. 3. Change the appropriate source code files. 4. Checkin the changes to Git. -5. Build the EPPlus solution. -6. Copy the EPPlus.dll and EPPlus.pdb files produced by the build from folder Documents\GitHub\EPPlus\EPPlus\bin\Debug to folder Documents\GitHub\Jeenee\lib. +5. Build the EPPlus solution using Visual Studio 2017. +6. Copy the EPPlus.dll file produced by the build from folder Documents\GitHub\EPPlus\EPPlus\bin\Debug to folder Documents\GitHub\Jeenee\lib. 7. CD to folder Documents\GitHub\Jeenee. -8. “git add” the EPPlus.dll and EPPlus.pdb files. -9. "git Commit" and "git push" the changes to EPPlus.dll and EPPlus.pdb. +8. "git add" the EPPlus.dll file. +9. "git Commit" and "git push" the changes to EPPlus.dll.