Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Excel Reader : get strikeout / strikethrough value
    primarykey
    data
    text
    <p>I am looking for way to parse the strikeout / strikethrough value of cells in an Excel sheet, using if possible a PHP script. The cells that are strikeout or not contain simple text values (no formula or anything).</p> <p>I have try using <a href="http://code.google.com/p/php-excel-reader/" rel="nofollow noreferrer">http://code.google.com/p/php-excel-reader/</a> and a few others scripts. But I have not found any PHP script that parse this specific value (strikeout) and I have try without success to add this parsing feature to the php-excel-reader.</p> <p>I have try to add the following :</p> <pre><code>function lineTrought($row,$col,$sheet=0) { return $this-&gt;fontProperty($row,$col,$sheet,'strikethrough'); } </code></pre> <p>And also add some code to this part of the parse code (indicated by **) :</p> <pre><code> case SPREADSHEET_EXCEL_READER_TYPE_FONT: $height = v($data,$pos+4); $option = v($data,$pos+6); $color = v($data,$pos+8); $weight = v($data,$pos+10); $under = ord($data[$pos+14]); **$strikethrough = v($data,$pos+16);** $font = ""; // Font name $numchars = ord($data[$pos+18]); if ((ord($data[$pos+19]) &amp; 1) == 0){ $font = substr($data, $pos+20, $numchars); } else { $font = substr($data, $pos+20, $numchars*2); $font = $this-&gt;_encodeUTF16($font); } $this-&gt;fontRecords[] = array( 'height' =&gt; $height / 20, 'italic' =&gt; !!($option &amp; 2), 'color' =&gt; $color, 'under' =&gt; !($under==0), 'bold' =&gt; ($weight==700), **'strikethrough'=&gt;$strikethrough,** 'font' =&gt; $font, 'raw' =&gt; $this-&gt;dumpHexData($data, $pos+3, $length) ); break; </code></pre> <p>But I can't find the right data that indicate the strikethrough value. v($data,$pos+16) is incorrect and I have try a bunch of other stuff without any success.</p> <p>If not possible with a PHP library, any idea on how I could parse my XLS with a Python or Perl script and then switch the data to PHP?</p> <p>It seems like Spreadsheet::ParseExcel-0.55 from CPAN Perl script might work but my main application is PHP so I would need to write result to a file and parse it back in PHP or something like this.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload