excel icon indicating copy to clipboard operation
excel copied to clipboard

Lost style after save.

Open sxd1140 opened this issue 1 year ago • 4 comments

v2.1.0

import 'dart:io';

import 'package:excel/excel.dart';

void main() async {
  var bytes = File('${Directory.current.path}/before.xlsx').readAsBytesSync();
  var excel = Excel.decodeBytes(bytes);
  var tableName = excel.getDefaultSheet();
  var table = excel.tables[tableName];
  table!.row(0)[3]!.value = 'abc';
  var fileBytes = excel.save();
  File('${Directory.current.path}/after.xlsx').writeAsBytesSync(fileBytes!);
}

I just change text and save. Lost allcolumn width and some cell style and few cell type(not show in this case)

before

after

sxd1140 avatar May 25 '23 08:05 sxd1140

I'm facing the same issue

bmsrangel avatar Jun 28 '23 17:06 bmsrangel

I'm facing the same issue

Did u found solution to fix this?

bakhus99 avatar Jul 11 '23 05:07 bakhus99

I'm facing the same issue

Did u found solution to fix this?

In this issue the usage of Firebase Functions with Python was suggested.

As my application is very simple, I ended up using Python for the whole app. The UI was built with Flet (a Python package to build Flutter apps) and the Excel file was manipulated with the package openpyxl

bmsrangel avatar Jul 11 '23 10:07 bmsrangel

Confirmed by #277. The ColumnWidth doesnt get parsed in the first place.

Dominic-Wagner avatar Jan 20 '24 18:01 Dominic-Wagner