You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
final image = File(p.join(Directory.current.path, 'map.png')).readAsBytesSync();
sheet.pictures.addStream(15, 1, image)
^Results in late initialization exception on lastColOffset.
final image = File(p.join(Directory.current.path, 'map.png')).readAsBytesSync();
sheet.pictures.addStream(15, 1, image)..lastColOffset = 0..lastRowOffset = 0;
final fileName = _createFilename(taEntry);
final bytes = newExcel.saveAsStream();
final File saveFile = File(p.join(exportDirectory.path, fileName));
saveFile.writeAsBytesSync(bytes);
^Results in a corrupted excel file with seemingly incorrect or malformed drawing1.xml and excel reporting:
"We found a problem with some content in [file] Do you want us to recover?"
-> Click Yes and reports:
"Repaired Records: Drawing from /xl/drawings/drawing1.xml part (Drawing shape)"
Result:
Image is located in media folder fine but is not present within the sheet and drawing xml seems to be malformed or incorrect.
Steps to reproduce
As above
Code sample
Code sample
ASABOVE
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Stack Traces
Stack Traces
[ERROR:flutter/runtime/dart_vm_initializer.cc(40)] UnhandledException:LateInitializationError:Field'lastColOffset' has not been initialized.
#0Picture.lastColOffset (package:syncfusion_flutter_xlsio/src/xlsio/images/picture.dart)
#1SerializeWorkbook._saveDrawings.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:1851:33)
serialize_workbook.dart:1851
#2XmlBuilder._insert (package:xml/src/xml/builder.dart:326:12)
builder.dart:326
#3XmlBuilder.element (package:xml/src/xml/builder.dart:178:9)
builder.dart:178
#4SerializeWorkbook._saveDrawings.<anonymous closure>.<anonymous closure> (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:1848:21)
serialize_workbook.dart:1848
#5XmlBuilder._insert (package:xml/src/xml/builder.dart:326:12)
builder.dart:326
#6XmlBuilder.element (package:xml/src/xml/builder.dart:178:9)
builder.dart:178
#7SerializeWorkbook._saveDrawings.<anonymous closure> (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:1839:19)
serialize_workbook.dart:1839
#8XmlBuilder._insert (package:xml/src/xml/builder.dart:326:12)
builder.dart:326
#9XmlBuilder.element (package:xml/src/xml/builder.dart:178:9)
builder.dart:178
#10SerializeWorkbook._saveDrawings (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:1809:13)
serialize_workbook.dart:1809
#11SerializeWorkbook._saveWorksheet.<anonymous closure> (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:714:9)
serialize_workbook.dart:714
#12XmlBuilder._insert (package:xml/src/xml/builder.dart:326:12)
builder.dart:326
#13XmlBuilder.element (package:xml/src/xml/builder.dart:178:9)
builder.dart:178
#14SerializeWorkbook._saveWorksheet (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:453:13)
serialize_workbook.dart:453
#15SerializeWorkbook._saveWorksheets (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:390:7)
serialize_workbook.dart:390
#16SerializeWorkbook.saveInternal (package:syncfusion_flutter_xlsio/src/xlsio/general/serialize_workbook.dart:110:5)
serialize_workbook.dart:110
#17Workbook.saveAsStream (package:syncfusion_flutter_xlsio/src/xlsio/general/workbook.dart:6221:16)
</details>
### On which target platforms have you observed this bug?Windows
### FlutterDoctor output
<details open><summary>Doctor output</summary>
```console
flutter doctor -v
[√] Flutter (Channel beta, 3.27.0-0.2.pre, onMicrosoftWindows [Version10.0.26100.2454], locale en-AU)
• Flutter version 3.27.0-0.2.pre on channel beta at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fc011960a2 (2 weeks ago), 2024-11-1412:19:18-0800
• Engine revision 397deba30f
• Dart version 3.6.0 (build 3.6.0-334.4.beta)
• DevTools version 2.40.1
[√] WindowsVersion (Installed version of Windowsis version 10 or higher)
[√] Android toolchain - develop forAndroid devices (AndroidSDK version 34.0.0)
• AndroidSDK at *
• Platform android-34, build-tools 34.0.0
• Java binary at:C:\ProgramFiles\Android\AndroidStudio2\jbr\bin\java
• Java version OpenJDKRuntimeEnvironment (build 21.0.3+-12282718-b509.11)
• AllAndroid licenses accepted.
[√] Chrome- develop for the web
• Chrome at C:\ProgramFiles\Google\Chrome\Application\chrome.exe
[√] VisualStudio- develop Windows apps (VisualStudioProfessional202217.10.8)
• VisualStudio at C:\ProgramFiles\MicrosoftVisualStudio\2022\Professional
• VisualStudioProfessional2022 version 17.10.35326.205
• Windows10SDK version 10.0.22621.0
[!] AndroidStudio (version 2023.3)
• AndroidStudio at C:\ProgramFiles\Android\AndroidStudio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dartXUnable to determine bundled Java version.
• Try updating or re-installing AndroidStudio.
[!] AndroidStudio (version 2024.1)
• AndroidStudio at C:\ProgramFiles\Android\AndroidStudio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dartXUnable to determine bundled Java version.
• Try updating or re-installing AndroidStudio.
[√] AndroidStudio (version 2024.2)
• AndroidStudio at C:\ProgramFiles\Android\AndroidStudio2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDKRuntimeEnvironment (build 21.0.3+-12282718-b509.11)
[√] VSCode (version 1.95.3)
• VSCode at *
• Flutterextension version 3.101.20241031
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • MicrosoftWindows [Version10.0.26100.2454]
• Chrome (web) • chrome • web-javascript • GoogleChrome131.0.6778.86
• Edge (web) • edge • web-javascript • MicrosoftEdge131.0.2903.70
[√] Network resources
• All expected network resources are available.
!Doctor found issues in2 categories.
The text was updated successfully, but these errors were encountered:
Bug description
^Results in late initialization exception on lastColOffset.
^Results in a corrupted excel file with seemingly incorrect or malformed drawing1.xml and excel reporting:
"We found a problem with some content in [file] Do you want us to recover?"
-> Click Yes and reports:
"Repaired Records: Drawing from /xl/drawings/drawing1.xml part (Drawing shape)"
Result:
Image is located in media folder fine but is not present within the sheet and drawing xml seems to be malformed or incorrect.
Steps to reproduce
As above
Code sample
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Stack Traces
Stack Traces
The text was updated successfully, but these errors were encountered: