There was an error in creating XML file

Asked By 0 points N/A Posted on -
qa-featured

Hello,

I wish to store my company data in xml format. I use Office 2007 and tried to generate xml from Microsoft Excel.

But when I try to generate xml the following error message appear.

All other functionality of Excel is just fine except about XML.

If you know the solution please let me know.

Application Error

There was an error in creating XML file

Object reference not set to an instance of an object.

Wishes,

Miller

SHARE
Best Answer by marsh watson
Answered By 0 points N/A #90321

There was an error in creating XML file

qa-featured

Dear Miller Stone,

I read your question very carefully. This is a general error message, make sure that xml document only contains an only single root element. This issue has come from the primary attribute is null and it should not be null.check it

You can use both Xmxxx.Save (string) and Xmlxxx.InnerXml to view the XML.

I'll give a useful xslt code to transform an Excel Worksheet into a nice XML file. 

Please visit this site to get it.

More information here:

Best Answer
Best Answer
Answered By 0 points N/A #90322

There was an error in creating XML file

qa-featured

This problem usually occurs when there is some reference to a location where the value is null.

You can diagnose this by any of the following way,

Solution 1: You should check the line to which the reference is null. Null Reference Exceptions are normally easy to diagnose. After finding the line where the reference is null, assign some value to that particular location.

Solution 2: Check the base settings files in the location where Microsoft Excel have been installed and delete these files;

  • BaseSettings.xml
  • Plugincache.xml
  • Usersettings.xml

Then restart the program and your issue will be diagnosed.

Related Questions