diff --git a/ENI2/Excel/ExcelComparer.cs b/ENI2/Excel/ExcelComparer.cs index 99eea7e0..4fa1138d 100644 --- a/ENI2/Excel/ExcelComparer.cs +++ b/ENI2/Excel/ExcelComparer.cs @@ -27,11 +27,20 @@ namespace ENI2.Excel { try { + sheet.Columns.ClearFormats(); + sheet.Rows.ClearFormats(); + Range usedRange = sheet.UsedRange; + lastUsedRow = usedRange.Rows.Count; + lastUsedColumn = usedRange.Columns.Count; + + /* Range last = sheet.Cells.SpecialCells(XlCellType.xlCellTypeLastCell, Type.Missing); Range range = sheet.get_Range("A1", last); lastUsedRow = last.Row; lastUsedColumn = last.Column; + */ + return true; } catch(Exception) diff --git a/ENI2/Excel/ExcelUtil.cs b/ENI2/Excel/ExcelUtil.cs index 0e30232a..c2a4d28e 100644 --- a/ENI2/Excel/ExcelUtil.cs +++ b/ENI2/Excel/ExcelUtil.cs @@ -982,6 +982,9 @@ namespace ENI2.Excel } } + if (!stat.Flag.IsNullOrEmpty()) stat.Flag = stat.Flag.ToUpper(); + if (!stat.PortOfRegistry.IsNullOrEmpty()) stat.PortOfRegistry = stat.PortOfRegistry.ToUpper(); + stat.MMSINumber = reader.ReadTextNoWhitespace("STAT.MMSINumber"); stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign"); stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");