Answered How does o:OLEObject ProgID= work?

  • Thursday, December 29, 2011 5:44 PM
     
      Has Code

    Hi all;

    In a DOCX file I have an embedded spreadsheet. The link for it is:

    <o:OLEObject Type="Embed" ProgID="Excel.Sheet.12" ShapeID="_x0000_i1025" DrawAspect="Content" ObjectID="_1386657673"/>
    

    How do I know what spreadsheet to get for that object? Note that there is no r:id=.

    thanks - dave


    The Programming Olympics - Code Wars
    • Edited by DavidThi808 Thursday, December 29, 2011 6:03 PM
    •  

All Replies

  • Thursday, December 29, 2011 8:42 PM
    Moderator
     
     

    Hi Dave,

    Thanks for the question, I'll get back to you shortly.  What application/version created this spreadsheet?  

    Best regards,
    Tom Jebo
    Escalation Engineer
    Microsoft Open Specifications

  • Thursday, December 29, 2011 9:05 PM
     
     

    Hi Tom;

    Office 2010 and all Office (our program was not involved). It appears to happen if I do the insert object when Excel is running even if Excel has no workbooks open in it.

    thanks - dave


    The Programming Olympics - Code Wars
  • Monday, January 02, 2012 6:36 PM
    Moderator
     
     

    Thanks Dave, I'm just getting back into this.  I'll let you know as soon as I have something.  Happy New Year!

    Tom

  • Monday, January 16, 2012 6:06 PM
    Moderator
     
     Answered Has Code

    Sorry this took so long to get back to Dave.  I've discovered that if you have more than one embedding, Word will use the relid mechanism like:

           <o:OLEObject Type="Embed" ProgID="Excel.SheetBinaryMacroEnabled.12" ShapeID="_x0000_i1026" DrawAspect="Content" ObjectID="_1388223847" r:id="rId6"/>
    


    But if you have only one embedding, it assumes that it's the only embedding part in the package, i.e. ...\word\embeddings\Microsoft_Excel_97-2003_Worksheet1.xls

    Make sense?

    Tom 

    • Marked As Answer by DavidThi808 Monday, January 16, 2012 11:31 PM
    •  
  • Monday, January 16, 2012 11:34 PM
     
     

    Hi Tom;

    Thank you - dave

    ps - Can you ask them to update the documentation for this?


    Who will win The International Collegiate Programming Championships?
  • Monday, January 16, 2012 11:57 PM
    Moderator
     
     

    Will do.

    Tom