in reply to Openning XML in Excel using CGI

I can only assume that your users are on Windows. If that is the case there are a couple of things that will throw things off.

First be sure that your XML doesn't have any empty lines at the beginning. Also be sure that your namespaces match the version of Excel opening the files. He-Who-Must-Not-Be-Named has changed the namespaces AND functionality over the last three versions of SpreadSheetML.

Also check your xslt processor. I use the libxslt libraries through XML::LibXSLT and have to do some doctoring after the transform to get my namespaces correct.

Also, I think you touched on this at the last of your post, but saving the file to the file system and then opening is always a good step. But remember this, IE has a habit of overruling mime-type with file extension. In some cases past I have had the mime-type overruled in favor of the mime-type assoiciated with the file extension, and if you give it a file extension it doesn't have, it bails even if you gave it a mime type to use. So when you save the file:

What file extension to you give it?
Do you open by double-clicking or by the 'Open ...' menu?
Which version of excel do you or your users use?

Don
WHITEPAGES.COM | INC
Everything I've learned in life can be summed up in a small perl script!

Replies are listed 'Best First'.
Re^2: Openning XML in Excel using CGI
by rashley (Scribe) on Nov 29, 2006 at 16:46 UTC
    You are correct, the users on on Windows.

    I'm not explicitly setting a file extension or name. Using vnd.ms-excel, it comes through as the name of my CGI with .xls tacked on the end.

    The 'Open' menu is what's giving me the touble.

    Most of my users are on Excel 2002, SP3. But this may not always be the case.

      Try changing the file extension or explicitly setting it to 'xml'. Then try double-clicking as well to see how that works. Are you actually using SpreadSheetML or just simple xml? My results didn't improve in this respect until I started using SpreadSheetML (xlxml).

      Excel 2002 should recognize the .xml extension for it's file, while 2003 prefers .xlxml.

      Don
      WHITEPAGES.COM | INC
      Everything I've learned in life can be summed up in a small perl script!
        I'm using simple xml, and I'm not sure how to explicitly set the filename.

        Double-clicking what? It's a submit button that triggers the whole thing.