Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
XML schema validation fails
Hi,
currently I have a little problem upon saving some excel worksheets as xml data. Normally cell's without a value are not exported into xml, because in my schema they are marked as optional (see schema below). But sometimes values are copy-pasted into the worksheet and I'll get the following error message while saving from the schema validation: "Error parsing '' as decimal datatype. The attribute 'Exposure' with value '' failed to parse." I can't find any differences to other "empty" cells - same format, formula and value are blank. Any ideas? Kind regards, Michael Here is the schema I use: <?xml version="1.0" encoding="UTF-8" standalone="yes"? <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" <xs:element name="test" <xs:complexType <xs:sequence <xs:element ref="myType" maxOccurs="unbounded" / </xs:sequence </xs:complexType </xs:element <xs:element name="myType" <xs:complexType <xs:attribute name="Exposure" type="Amount" use="optional" / </xs:complexType </xs:element <xs:simpleType name="Amount" <xs:restriction base="xs:decimal" <xs:minInclusive value="0" / <xs:fractionDigits value="12" / </xs:restriction </xs:simpleType </xs:schema |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding validation fails with automation error | Excel Programming | |||
Validation fails on copying | Excel Discussion (Misc queries) | |||
XMLMap and Schema validation | Excel Programming | |||
VBA Inserted Data Validation Fails | Excel Programming | |||
Cell Protection fails with validation lists | Excel Programming |