Skip to Content
author's profile photo Former Member
Former Member

To read embedded PDF objects in .xlsx file

Hello,

We have a requirement to read the embedded PDF objects in excel 2007 file (.xlsx).

We tried doing this with the ZIP approach and found that the contents of embedded objects are saved in oleObject1.bin.

Now this .bin file is of compound file binary format and we don't know how to read contents from this file.

Does any one knows anything about this or is there any other approach to read the pdf.

Regards,

Mandeep

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 30, 2011 at 11:03 AM

    We are able to extract the PDF file data from OleObject1.bin file.

    Below is the code to extract the PDF file.

    DATA: lv_h type xstring,

    lv_object type xstring,

    lv_pdf type xstring,

    lv_len type i.

    lv_h = '255044462D'. " where this value is binary representation of '%PDF".

    FIND FIRST OCCURRENCE OF lv_h IN lv_object IN BYTE MODE MATCH OFFSET lv_len.

    lv_pdf = lv_object+lv_len.

    Now LV_PDF will contain PDF data in XSTRING format.

    Regards,

    Mandeep

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.