Hello,
there is only one ComboBox in a new template workbook. Nothing another.
When result file is creating from template, only number 1 is writing to cell A1 by XLSRW.
Just presence of object ComboBox is enough to cause corruption in result file.
During openning the result file excel shows error message "corrupted file repair/cancel" with opening the result file.
If I choose "repair" then CoboBox is deleted by excel repair.
If I use a template without object ComboBox, the result file is ok.
I tested it with XLSRW 5.20.46
Important note - it depends on version of Excel
So if I make or save the template under Excel 2013, 2010 the result file is corupted.
If I make or save the template under Excel 2007 everything is OK .
(If I make the template under Excel 2013 and after that I open and save it under Excel 2007 the result is ok too. )
Josef Kohout
Presence of ComboBox in template makes corrupted result
Presence of ComboBox in template makes corrupted result
Last edited by jsfkcz on Mon Jun 15, 2015 7:01 am, edited 1 time in total.
Re: Presence of ComboBox in template makes corrupted result
Hello
I couldn't reproduce this. Tested with excel 2013.
I couldn't reproduce this. Tested with excel 2013.
Lars Arvidsson, Axolot Data
Re: Presence of ComboBox in template makes corrupted result
Hello,
I put the templates and result files for download at http://www.genet.cz/kohout/xlsrw/xlsrw_combobox.zip .
There is one template created under Excel 2013 and the same file opened and saved under Excel 2007 SP3.
I made 2 results by these templates.
I cannot open result "2013" - there is error message with opening.
If I choose try to restore - "Yes",
- under Excel 2013 the combobox disappeared by correction
- under Excel 2007 SP3 the combox stay there
In both cases, there is error message "Corrected part: /xl/worksheets/sheet1.xml"
But Ican open the file result 2013_2007 without problem.
Please try to analyse templates/results .
Josef Kohout
I put the templates and result files for download at http://www.genet.cz/kohout/xlsrw/xlsrw_combobox.zip .
There is one template created under Excel 2013 and the same file opened and saved under Excel 2007 SP3.
I made 2 results by these templates.
I cannot open result "2013" - there is error message with opening.
If I choose try to restore - "Yes",
- under Excel 2013 the combobox disappeared by correction
- under Excel 2007 SP3 the combox stay there
In both cases, there is error message "Corrected part: /xl/worksheets/sheet1.xml"
But Ican open the file result 2013_2007 without problem.
Please try to analyse templates/results .
Josef Kohout
Re: Presence of ComboBox in template makes corrupted result
Hello,
I compared the xlsx result files by their xml parts with this result:
The problematic result file xlsrw_result_combo_2013.xlsx contain element "control"
in its part \xl\worksheets\sheet1.xml
There is larger part controls In the template file xlsrw_template_combo_2013.xlsx
If I remove the short "control" part from problematic result file manually, I can open the result file without errors.
Please try to look at this problem again.
Josef Kohout
(The ok result file xlsrw_result_combo_2013_2007.xlsx (from template saved under Excel 2007) did not contain element "controls" in this part - probably it depends on version of Excel......)
I compared the xlsx result files by their xml parts with this result:
The problematic result file xlsrw_result_combo_2013.xlsx contain element "control"
Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" >
.
.
.
.
</sheetData>
<pageMargins left="0.7" right="0.7" top="0.787401575" bottom="0.787401575" header="0.3" footer="0.3" />
<pageSetup paperSize="9" />
<legacyDrawing r:id="rId2" />
<controls>
<control shapeId="1025" r:id="rId3" name="Drop Down 1" />
</controls>
</worksheet>
There is larger part controls In the template file xlsrw_template_combo_2013.xlsx
Code: Select all
.
.
.
<controls>
<mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
<mc:Choice Requires="x14">
<control r:id="rId3" name="Drop Down 1" shapeId="1025">
<controlPr autoPict="0" autoLine="0" defaultSize="0">
<anchor moveWithCells="1">
<from>
<xdr:col>1</xdr:col>
<xdr:colOff>0</xdr:colOff>
<xdr:row>1</xdr:row>
<xdr:rowOff>9525</xdr:rowOff>
</from>
<to>
<xdr:col>3</xdr:col>
<xdr:colOff>9525</xdr:colOff>
<xdr:row>2</xdr:row>
<xdr:rowOff>180975</xdr:rowOff>
</to>
</anchor>
</controlPr>
</control>
</mc:Choice>
</mc:AlternateContent>
</controls>
</mc:Choice>
</mc:AlternateContent>
If I remove the short "control" part from problematic result file manually, I can open the result file without errors.
Please try to look at this problem again.
Josef Kohout
(The ok result file xlsrw_result_combo_2013_2007.xlsx (from template saved under Excel 2007) did not contain element "controls" in this part - probably it depends on version of Excel......)
Re: Presence of ComboBox in template makes corrupted result
Hello
This is fixed in update 5.20.50
This is fixed in update 5.20.50
Lars Arvidsson, Axolot Data