Closed W77587 closed 6 months ago
Hi @W77587 , interessting bug report. I didn't think that more than a few lines would be used there and therefore didn't test any more. Just out of interest, why is so much sample data needed?
Lots to do right now. I'll have to see when I get around to it
Hi @W77587 I have tried to reproduce the error but unfortunately have not succeeded. I was able to add 2000 lines without any problems and the excel file is fine.
Which browser do you use?
Can you try it with a minimal example, i.e. just pass the context and the sampleData.
Alternatively, you can also provide an Excel file directly with https://docs.spreadsheet-importer.com/pages/Configuration/#spreadsheettemplatefile
Hi @W77587, are you able to provide are better reproducable example?
Hi @W77587 i´m closing for now. You can reopen it if you have more information for me.
OData Version
OData V4
Draft
Yes
Scenario
List Report
Environment
BAS
UI5 Spreadsheet Component
0.31.3
What happened?
Hello! Thanks for this tool.
When passing a large sampleData array, the generated template file is corrupt. We first thought it was the data we were passing into sampleData but then replaced it with a synthetic array and noticed that we can pass 400 records to it, but when we try 1000 records it generates a corrupt file. Anything beyond 1000 leads to a corrupt excel file. I've debugged your component and don't see any issue with the sample data workbook generation so maybe the issue is on sheetjs when
book_append_sheet
is called?This is the quick and dirty code we use to generate sample data.
We have confirmed the columns are matching with what the component expects.
We have debugged
onTempDownload
and it follows a predictable path: No spreadsheet template file, but sampleData so iterates on sample data, generates a cell for each one (all properties in this entityset are strings) and then writes the file.We have also tried passing
{ compression: true }
when it is callingXLSX.writeFile
as the third opts argument but that didn't help. In any case probably something to enable to make the files shorter.Thank you
Relevant log output
Spreadsheet Component Init