I'm using this code to generate an XML-file:
If File.Exists("d: \k2b.xls") Then File.Delete("d: \k2b.xls")
Dim fs As New System.IO.FileS tream("d:\k2b.x ml",
IO.FileMode.Cre ateNew)
dsP.WriteXml(fs )
fs.Close()
fs.Dispose()
When importing to Excel 2000 (10.0) it shows the entire xml-code (as
if opened with text editor). What am I doing wrong?
--
I've posted this question before, but forgot to follow up. Andrew
Morton kindly responded and asked:
"If you save it with an extension of .xls instead, does Excel then
"understand " it?"
The answer is no. The result can be seen at
www.dbconsult.dk/ms/xls.jpg.
/Snedker
If File.Exists("d: \k2b.xls") Then File.Delete("d: \k2b.xls")
Dim fs As New System.IO.FileS tream("d:\k2b.x ml",
IO.FileMode.Cre ateNew)
dsP.WriteXml(fs )
fs.Close()
fs.Dispose()
When importing to Excel 2000 (10.0) it shows the entire xml-code (as
if opened with text editor). What am I doing wrong?
--
I've posted this question before, but forgot to follow up. Andrew
Morton kindly responded and asked:
"If you save it with an extension of .xls instead, does Excel then
"understand " it?"
The answer is no. The result can be seen at
www.dbconsult.dk/ms/xls.jpg.
/Snedker
Comment