<?xml version="1.0" encoding="windows-1252"?>
<node id="735171" title="Spreadsheet::ParseExcel with embedded PDF cells" created="2009-01-09 08:29:43" updated="2009-01-09 08:29:43">
<type id="115">
perlquestion</type>
<author id="438971">
ForgotPasswordAgain</author>
<data>
<field name="doctext">
&lt;p&gt;It happens that users can embed PDFs and images into cells in Excel. As far as I can tell, there's no support for that in Spreadsheet::ParseExcel. True? I'm on a linux system, so no chance of using OLE. Anyone know another way to extract those media files from the cells? This is the relevant part of what I have (basically from the SYNOPSIS):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
my $formatter = Spreadsheet::ParseExcel::FmtUnicode-&gt;new();
my $workbook = Spreadsheet::ParseExcel::Workbook-&gt;Parse($file, $formatter);

foreach my $worksheet ($workbook-&gt;worksheets) {
    my ($row_min, $row_max) = $worksheet-&gt;row_range;
    my ($col_min, $col_max) = $worksheet-&gt;col_range;

    foreach my $row ($row_min .. $row_max) {
        foreach my $col ($col_min .. $col_max) {
            my $cell = $worksheet-&gt;get_cell($row, $col);
            next unless $cell;

            # this is what I imagine doing:
            if ($cell-&gt;{Type} eq 'pdf') {
                # get the PDF somehow ....
            }
        }
    }
}
&lt;/code&gt;&lt;/p&gt;</field>
</data>
</node>
