AutoFit optimization

This commit is contained in:
Serghei Cebotari 2024-11-14 22:44:22 +03:00
parent e1289aebbc
commit b18e573da4

View File

@ -55,10 +55,18 @@ internal class OcrTool : ITool
{
Range excelCell = app.ActiveSheet.Cells(currentCell.Row + row,
currentCell.Column + column);
excelCell.Value2 = table[row,column];
excelCell.EntireColumn.AutoFit();
excelCell.EntireRow.AutoFit();
excelCell.Value2 = table[row, column];
}
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();
}
}