Aktiver Bereich korrigiert
Die aktiven Zellen, d.h. die zu vergleichenden wurden nicht zuverlässig erkannt. Ich habe daher eine andere Funktion verwendet, die ich auf Stackoverflow gefunden habe. Ganz 100% sicher bin ich allerdings nicht, ob dieser Quatsch in jeder Situation zufriedenstellend funktioniert.
This commit is contained in:
parent
6138c99ba9
commit
6382b082ba
@ -27,11 +27,20 @@ namespace ENI2.Excel
|
|||||||
{
|
{
|
||||||
try
|
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 last = sheet.Cells.SpecialCells(XlCellType.xlCellTypeLastCell, Type.Missing);
|
||||||
Range range = sheet.get_Range("A1", last);
|
Range range = sheet.get_Range("A1", last);
|
||||||
|
|
||||||
lastUsedRow = last.Row;
|
lastUsedRow = last.Row;
|
||||||
lastUsedColumn = last.Column;
|
lastUsedColumn = last.Column;
|
||||||
|
*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch(Exception)
|
catch(Exception)
|
||||||
|
|||||||
@ -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.MMSINumber = reader.ReadTextNoWhitespace("STAT.MMSINumber");
|
||||||
stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign");
|
stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign");
|
||||||
stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");
|
stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user