public static ExcelWorksheet DeleteEndEmptyColumns(this ExcelWorksheet ws) { while (ws.IsEndColumnEmpty()) { ws.DeleteColumn(ws.Dimension.End.Column, 1); } return(ws); }