<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Worksheet ss:Name="Sheet1">
<Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="16.5">
<Row ss:AutoFitHeight="0">
<Cell ss:StyleID="s23"/>
</Row>
</Table>
</Worksheet>
</Workbook >
我需要把那个红色的"ss"也带上去,不知道怎么写了.
下在这一段,运行后看不到"ss"
nsmgr = new XmlNamespaceManager(xml.NameTable);
nsmgr.AddNamespace("wbk", "urn:schemas-microsoft-com:office:spreadsheet");
nsmgr.AddNamespace("o", "urn:schemas-microsoft-com:office:office");
nsmgr.AddNamespace("x", "urn:schemas-microsoft-com:office:excel");
nsmgr.AddNamespace("ss", "urn:schemas-microsoft-com:office:spreadsheet");
xndl = xml.DocumentElement.SelectNodes("/wbk:Workbook",nsmgr);XmlElement cell = xml.CreateElement("Cell", xml.DocumentElement.NamespaceURI);
cell.SetAttribute("ss:Index", x.ToString()); XmlElement data = xml.CreateElement("Data", xml.DocumentElement.NamespaceURI);
data.SetAttribute("ss:Type", "String");
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货