numberFormatIndex property
Gets/sets cell numberFormat index.
final Workbook workbook = Workbook();
final Worksheet sheet = workbook.worksheets[0];
final Style style = workbook.styles.add('style');
// set number format.
style.numberFormat = '_(\$* #,##0_)';
final Range range1 = sheet.getRangeByIndex(3, 4);
range1.number = 10;
range1.cellStyle = style;
// Check number format index.
print(workbook.styles[1].numberFormatIndex);
final List<int> bytes = workbook.saveAsStream();
File('CellStyle.xlsx').writeAsBytes(bytes);
workbook.dispose();
Implementation
late int numberFormatIndex;