I use the following writexml method to convert a dataset/datatable to .xml:
ds.WriteXml(mstrpath, XmlWriteMode.WriteSchema)
ds.WriteXmlSchema(mstrpathxsd)
The path strings are simple full paths: eg, f:\emapps\xmlfiles\filename.xml
(or .xsd as appropriate).
I get an xml file, but there are 2 problems:
1. text that looks like numbers - eg, a column with 45622, 00987, 01234,
etc - drops the prefix '0' and is formatted inside excel as numeric columns.
This is so inside excel and in the .xml file itself.
2. all numeric columns - whether they should be numerics or not - have an
extra 'agg' column, which I do not want.
An ideas how I can a) convert the data to xml as text when it is a text
column and b) avoid this 'agg' column?
Tx for any help.
Bernie Yaeger