AutoFit optimization
This commit is contained in:
parent
e1289aebbc
commit
b18e573da4
@ -55,10 +55,18 @@ internal class OcrTool : ITool
|
|||||||
{
|
{
|
||||||
Range excelCell = app.ActiveSheet.Cells(currentCell.Row + row,
|
Range excelCell = app.ActiveSheet.Cells(currentCell.Row + row,
|
||||||
currentCell.Column + column);
|
currentCell.Column + column);
|
||||||
excelCell.Value2 = table[row,column];
|
excelCell.Value2 = table[row, column];
|
||||||
excelCell.EntireColumn.AutoFit();
|
|
||||||
excelCell.EntireRow.AutoFit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (Range row in tableRange.Rows)
|
||||||
|
{
|
||||||
|
row.EntireRow.AutoFit();
|
||||||
|
}
|
||||||
|
foreach (Range column in tableRange.Columns)
|
||||||
|
{
|
||||||
|
column.EntireColumn.AutoFit();
|
||||||
|
}
|
||||||
|
|
||||||
app.ActiveSheet.Cells(currentCell.Row + rowCount + 1, currentCell.Column).Activate();
|
app.ActiveSheet.Cells(currentCell.Row + rowCount + 1, currentCell.Column).Activate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user