Bug 63849 - Error writting table with column name containing LF (line feed)
Summary: Error writting table with column name containing LF (line feed)
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 4.0.1-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-15 08:11 UTC by Marek
Modified: 2019-11-16 16:55 UTC (History)
0 users



Attachments
File written by POI (10.10 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-10-15 08:11 UTC, Marek
Details
Original file created in Excel (12.26 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-10-15 08:11 UTC, Marek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek 2019-10-15 08:11:12 UTC
Created attachment 36829 [details]
File written by POI

I am reading xlsx file which contains defined table, then i am writting this file back with another name. When trying to open this new file Excel complains with message: "We found a problem with some content in 'file.xlsx'. Do you want us to recover as much as we can?....". I have found, that problem is with table. Original file has table written as:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="xr xr3" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" id="1" xr:uid="{26A11951-810F-49EC-AAFA-5722529390E0}" name="tblPojazdy" displayName="tblPojazdy" ref="A1:C2" totalsRowShown="0" headerRowDxfId="6" dataDxfId="5" tableBorderDxfId="4" headerRowCellStyle="Normalny 2 2" dataCellStyle="Normalny 2 3">
	<autoFilter ref="A1:C2" xr:uid="{D0BFECB1-1E52-4089-B920-3A52DB2D9F23}"/>
	<tableColumns count="3">
		<tableColumn id="12" xr3:uid="{B01BB46B-E7FD-4689-8E30-2B2DC686DD21}" name="Suma ubezpieczenia" dataDxfId="3" dataCellStyle="Walutowy 3"/>
		<tableColumn id="16" xr3:uid="{C2B2204D-FC92-4D87-A503-BE359CB3F23A}" name="AC_x000a_[serwis]" dataDxfId="2" dataCellStyle="Normalny 2 3"/>
		<tableColumn id="22" xr3:uid="{C3D15AB3-0D6E-4F8D-B4D2-18CAC734CC80}" name="Składka AC" dataDxfId="1" dataCellStyle="Normalny 2 3">
			<calculatedColumnFormula>tblPojazdy[AC
'[serwis']]*tblPojazdy[Suma ubezpieczenia]</calculatedColumnFormula>
		</tableColumn>
	</tableColumns>
	<tableStyleInfo showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>
</table>

but POI is generating:

<?xml version="1.0" encoding="UTF-8"?>
<table mc:Ignorable="xr xr3" id="1" xr:uid="{26A11951-810F-49EC-AAFA-5722529390E0}" name="tblPojazdy" displayName="tblPojazdy" ref="A1:C2" totalsRowShown="0" headerRowDxfId="6" dataDxfId="5" tableBorderDxfId="4" headerRowCellStyle="Normalny 2 2" dataCellStyle="Normalny 2 3" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3">
	<autoFilter ref="A1:C2" xr:uid="{D0BFECB1-1E52-4089-B920-3A52DB2D9F23}"/>
	<tableColumns count="3">
		<tableColumn id="12" xr3:uid="{B01BB46B-E7FD-4689-8E30-2B2DC686DD21}" name="Suma ubezpieczenia" dataDxfId="3" dataCellStyle="Walutowy 3"/>
		<tableColumn id="16" xr3:uid="{C2B2204D-FC92-4D87-A503-BE359CB3F23A}" name="AC
[serwis]" dataDxfId="2" dataCellStyle="Normalny 2 3"/>
		<tableColumn id="22" xr3:uid="{C3D15AB3-0D6E-4F8D-B4D2-18CAC734CC80}" name="Składka AC" dataDxfId="1" dataCellStyle="Normalny 2 3">
			<calculatedColumnFormula>tblPojazdy[AC
'[serwis']]*tblPojazdy[Suma ubezpieczenia]</calculatedColumnFormula>
		</tableColumn>
	</tableColumns>
	<tableStyleInfo showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/>
</table>

Difference is in column name, originaly name="AC_x000a_[serwis]".
Comment 1 Marek 2019-10-15 08:11:55 UTC
Created attachment 36830 [details]
Original file created in Excel