The extension on a file name is really meaningless, except by convention. You could name a text file as a .exe, or an excel file with a .zip extension.
Now, there are two problems:
1) HUMANS assign meaning to them. If I see a file with ".xml" on the end, I assume it is an XML file. If I see a file that ends with ".zip", I assume I need to unzip it before I can read/use it.
2) Computers - and specifically Windows - assign meaning to them. Windows sets up "associations" between file extensions and applications. So, on my windows machine, when I double click on a file with a .doc extension, Windows says "Oh...i need to open that file. It has the '.doc' extension, and I know the user wants me to use MS Word to open those file". Any .xml file is opened with XML Spy. If I doubleclick on a file with an extension there is no association for, my computer asks me "What do you want to open this file with?", and further says "Should I do this for EVERY file with that extension from now on?"
So..the upshot here is that you cannot FORCE someone to open a XML file with excel - the USER gets to decide what to use. After all, what if they don't even HAVE Excel? I personally use OpenOffice for my spreadsheets.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
thanks fred and Ulf
Actually I have seen sample of xml which on double click open in excel (even in open office ) but many attributes are added to it just for one row in excel almost one page of attributes are added (for style and proper format ) so i thought if any one have done this before can help