setRowHeightInPixels method

void setRowHeightInPixels(
  1. int iRowIndex,
  2. double rowHeight
)

Sets Rows Heights in pixels for the specified column.

//Create a new Excel Document.
final Workbook workbook = Workbook();
// Accessing sheet via index.
final Worksheet sheet = workbook.worksheets[0];
// set row height in pixels.
sheet.setRowHeightInPixels(2, 30);
final List<int> bytes = workbook.saveAsStream();
File('RowHeight.xlsx').writeAsBytes(bytes);
workbook.dispose();

Implementation

void setRowHeightInPixels(int iRowIndex, double rowHeight) {
  if (iRowIndex < 1 || iRowIndex > _book._maxRowCount) {
    throw Exception(
        'iRowIndex ,Value cannot be less 1 and greater than max row index.');
  }

  if (rowHeight < 0) {
    throw Exception('value');
  }

  _innerSetRowHeight(iRowIndex, rowHeight, true, 5);
}