sometimes my generated document starts with:
- Code: Select all
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:ns2="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:ns4="http://schemas.microsoft.com/office/excel/2006/main" xmlns:ns5="http://schemas.microsoft.com/office/excel/2008/2/main">
<ns2:cols>
So there is a ns2 in every Element
But most of the time it starts like this:
- 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" xmlns:xdr="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:ns4="http://schemas.microsoft.com/office/excel/2006/main" xmlns:ns5="http://schemas.microsoft.com/office/excel/2008/2/main">
<cols>
The ns2 seems to be the cause for the increased file-size in that matter.
When opening the files in Excel the content is the same. I don't see a practical problem here, but I am confused why this happend.
My code is based on this sample file: https://github.com/plutext/docx4j/blob/ ... sheet.java
Do you need further information?