Am .10.2018, 03:32 Uhr, schrieb pcsailor <
philcu...@gmail.com>:
> Hi,
>
> Has anyone seen this error? Is happens every time I open up this Excel
> file I've created with Python & Openpyxl.
Excel creates these error messages when it encounters invalid bits of XML.
It then generally excludes the relevant package part. The logs aren't
hugely informative but at least this one tells us that the <mergedCells>
element of the worksheet is invalid. You can use a validator such as that
in lxml or the Office OpenXML Productivity Tool to find out exactly what's
invalid. You're using a patch on openpyxl to handle all those merged
ranges so it's probably related to that.
> Where is the 'Merge cells error from /xl/worksheets/sheet2.xml part'? I
> don't have a 'sheet2' in this spreadsheet.
No, but worksheets are always numbered in the archive.
It's an XML namespace declaration. I think the idea was originally that
the schemas would be available under the URL but in practice they are just
unique prefixes for the XML elements. This particular namespace from Excel
2007, ie. before the specification became official, and is used throughout
OOXML files.
Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel:
+49-211-600-3657
Mobile:
+49-178-782-6226