Unable to retrieve the manifest from the document

I'm getting "Unable to retrieve the manifest from the document" error on my VS2005 development machine as soon as I hit this line

ServerDocument sd = new ServerDocument ("D:\\Inetpub\\wwwroot\\Doc1.doc");

The code is from an ASP.NET page attempting to dynamically generate a XLS file.




Answer this question

Unable to retrieve the manifest from the document

  • ulven

    Hi Andrew,

    You are correct. I agree with you that the name ServerDocument implies a lot more than what it actually does. In future versions it may have additional features.

    Unfortunately the ServerDocument will not be of any help if you do not want code-behind to run on the client, which is understandable if your requirement is just to populate a few named ranges.

    I do not know enough about OfficeWriter to comment on that. I will find out more abut it. But it sounds like what you would need to generate xls files on the server. I suggest you try the Excel programming newsgroup too for suggestions.

    Hope this helps.



  • JohnC1102

    Hi Andrew,

    The ServerDocument class will not work with a non-VSTO Office doc. The document that you pass to the ServerDocument class needs to have a particular ActiveX control embedded in it. This control is called the VSTORuntimeStorage. When you compile a VSTO solution in VS, the AX control is inserted into the document.

    It seems that you are trying to start with a brand new Word document (not one that was already VSTO customized). In this case you need to first call ServerDocument.AddCustomization method, which adds a manifest to the doc.

    ServerDocument.AddCustomization(
       
    "D:\\Doc1.doc",        //   Path to your new document
       
    "MyAssembly",        //   Without the extension
       
    null,                        //    Assuming no deployment manifest
       
    "1.0.0.0",                //     Version number of assembly
       
    true);                      //     Make all paths in manifest relative

    After you have done this you should be able to successfully create a ServerDocument object for your document. Were you doing this already

     



  • Crazygon

    I think I have misunderstood what ServerDocument does. I had originally thought it would allow me to generate a new Excel document from within an ASP.NET app (running on a web server which does not have office).

    If I understand correctly all I can do is to fill a XML data island with data. In order to tranfer this data to an Excel named range I need some code to run on the client (With all the security problems associated with this).

    I'm looking to insert some data into a named range on an existing Excel spreadsheet. I want the user to be able to download this spreadsheet as a standard XLS file (with no code behind). Each time the document is downloaded I want to grab the latest data.

    Unless I'm wrong VSTO does not allow me to do this. I guess I'll have to use something like OfficeWriter from softartisans to allow me to generate XLS files on a server which does not have Excel installed on it.



  • Unable to retrieve the manifest from the document