Click to See Complete Forum and Search --> : Write excel into xml with blank cells


jacz
05-25-2009, 03:58 AM
Hello!

If there is blank cells in xml based Excel sheet, when exporting it into xml file, the correspondig <element></element> is missing from the xml file.

Although it is required to read the xml table and also validate it.

How could I export all the element data into xml file?

Thank you!

Charles
05-25-2009, 05:05 AM
If you are using WIndows then it's better to just read the Excel file directly with JScript and do your own conversion to XML see http://www.webdeveloper.com/forum/showthread.php?t=202501&page=2 and start reading about post 23.

Looking at my example I find that it might have trouble with empty cells.You'll need to change one line to if (!rs.fields(i).value == null) node.appendChild (dom.createTextNode (rs.fields(i).value));And if you have dates you might also have a little bit of trouble that is easily overcome.