Poblema conversione da excel a xml

venerdì 27 novembre 2009 - 16.16

Fante Profilo | Newbie

Salve a tutti ho un problema:
da una applicazione in c# esporto un documento xml popolato da un DTable dopodichè apro il documento con excel ,faccio delle modifiche alle celle e lo risalvo come documento xml....lo riapro ma le colonne che nn hanno celle valorizzate sono state eliminate......qualcuno ha avuto un problema simile? Grazie


RISOLTO

il NET Framework 1.1 mette a disposizione il metodo "DataSet.GetXmlSchema" dove sulla base del dataset costruisce un xsdschema con i tag <XS: > ma nn funziona quindi faccio puntare il mio xml a uno schema xsd fatto da me dove i tag sono < XSD: >

Intestazione XML:

<?xml version="1.0" encoding="utf-8"?>
<NewDataSet xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="D:\Progetti\...\...\....Schede.xsd">


Schede.xsd:

<?xml version="1.0" encoding="UTF-8" ?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="NewDataSet">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SchedaFornitoreExcel" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="......" type="xsd:string" />
<xsd:element name="......" type="xsd:string" />
<xsd:element name="......" type="xsd:dateTime" />
<xsd:element name="......" type="xsd:dateTime" />
<xsd:element name="......" type="xsd:dateTime" />
<xsd:element name="......." type="xsd:string" />
<xsd:element name="......." type="xsd:string" />
<xsd:element name="......." type="xsd:string" />
<xsd:element name="......." type="xsd:string" />
<xsd:element name="......." type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Partecipa anche tu! Registrati!
Hai bisogno di aiuto ?
Perchè non ti registri subito?

Dopo esserti registrato potrai chiedere
aiuto sul nostro Forum oppure aiutare gli altri

Consulta le Stanze disponibili.

Registrati ora !
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5