Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Unassigned: ws.InsertColumn throw exception in some sheets [15145]

$
0
0
The workbook attached.
For sheet 1, "ws.InsertColumn(3, 1);" throws exception "ColumnMax can not span over existing column 10." while sheet 3 works correctly although they looks same.

Test case:

using (var pck = new ExcelPackage(template, false))
{
var ws = pck.Workbook.Worksheets[1];

ws.InsertColumn(3, 1);



pck.SaveAs(new FileInfo(output));
}
Comments: Propose fix based on c6c16f4d9f16: (not very sure, please confirm) ExcelColumn.cs Ln 88 From if (cse.Column > _columnMin && c.ColumnMax <= value && cse.Column!=_columnMin) To if (cse.Column > _columnMin && c.ColumnMax < value && cse.Column!=_columnMin) It will fix the exception, but not sure if it's a correct fixing. Also, this line seems duplicated between "cse.Column > _columnMin" and "cse.Column!=_columnMin" Thanks.

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>