excel
excel copied to clipboard
Merged Cell Styles
Settings Merged Cell styles doesn't appear to work.
import 'dart:io';
import 'package:excel/excel.dart';
Future main(List<String> args) async {
var excel = Excel.createExcel();
var sheet = excel[excel.sheets.keys.first];
var aptosDisplayStyle = CellStyle(fontFamily: 'Aptos Display', bold: true);
sheet.merge(CellIndex.indexByString("A1"), CellIndex.indexByString("B2"),
customValue: const TextCellValue("90"));
sheet.setMergedCellStyle(CellIndex.indexByString("A1"),
aptosDisplayStyle.copyWith(rotationVal: 90));
await File("C:\\Users\\johnc\\Documents\\output_merge_test.xlsx")
.writeAsBytes(excel.encode()!);
}
Setting the style on the first cell does work.