Spine-Toolbox icon indicating copy to clipboard operation
Spine-Toolbox copied to clipboard

Excel for exported outputs needs to be repaired

Open danajhen opened this issue 1 year ago • 3 comments

Hello,

We have exported the outputs using the exporter to an excel, but the sheet has to be repaired every single time you open it. Repairing it returns the following message:

<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error152120_01.xml</logFileName>

Errors were detected in file '....spinetoolbox\items\exporter\output\[email protected]\Output_exported.xlsx'<repairedRecords><repairedRecord>Repaired Records: Worksheet properties from /xl/workbook.xml part (Workbook)</repairedRecord></repairedRecords></recoveryLog>

By recovering it once, and saving it again you can bypass this problem, but it is of course less than ideal. Is there another way or another setting in Spine that could solve this issue?

Thanks!

danajhen avatar Feb 29 '24 12:02 danajhen

I have never heard of or seen this error before. Is it possible to share the project and data so we could try to reproduce it? If not, can you be any more specific about what you are trying to export? Does the issue appear every time you export or is it due to some specific export mappings, i.e. does some very simple export to Excel succeed?

soininen avatar Feb 29 '24 12:02 soininen

The very simple export to Excel using SpineToTable succeeds, but using the following (specific) export mapping it results in the beforementioned error: exporter_energy_hub_model.json

danajhen avatar Feb 29 '24 13:02 danajhen

Thanks for the specification! It looks like you are exporting alternatives as 'table name' which maps to sheet names in Excel. Sheet names have certain limitations such as their length cannot exceed 31 characters. Is this perhaps what is corrupting the Excel files? Are your alternative names longer than that? Do you use some special characters in the names?

soininen avatar Mar 01 '24 11:03 soininen