Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 447007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:31:39+00:00 2026-05-12T21:31:39+00:00

I am looking for way to parse the strikeout / strikethrough value of cells

  • 0

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).

I have try using http://code.google.com/p/php-excel-reader/ 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.

I have try to add the following :

function lineTrought($row,$col,$sheet=0) {
    return $this->fontProperty($row,$col,$sheet,'strikethrough');
}

And also add some code to this part of the parse code (indicated by **) :

            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]) & 1) == 0){
                        $font = substr($data, $pos+20, $numchars);
                    } else {
                        $font = substr($data, $pos+20, $numchars*2);
                        $font =  $this->_encodeUTF16($font); 
                    }
                    $this->fontRecords[] = array(
                            'height' => $height / 20,
                            'italic' => !!($option & 2),
                            'color' => $color,
                            'under' => !($under==0),
                            'bold' => ($weight==700),
                            **'strikethrough'=>$strikethrough,**
                            'font' => $font,
                            'raw' => $this->dumpHexData($data, $pos+3, $length)
                            );
                    break;

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.

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?

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:31:39+00:00Added an answer on May 12, 2026 at 9:31 pm

    also check out: http://www.codeplex.com/PHPExcel

    it says it could read Excel files. i was using it mostly for writing, so I don’t know to what extent reading is supported.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First, I'm not looking a way to parse an RSS-feed. I am creating an
We're looking for a way to parse large amounts of XML files that conform
I am looking for a way to parse the following commandline syntax using the
I'm looking for a nice way to parse a string into two variables using
Possible Duplicate: Best way to parse command line arguments in C#? I'm looking for
I'm looking for a way to parse PHP-style request parameters in an ASP.NET app.
I'm looking for an easy way to parse a string that contains an ISO-8601
I am looking for a way to parse URL without queryString using Regular expression.
I'm looking for a way to parse the value of integerFields and returning the
I'm looking for a way to parse an xml/html document in ruby, which contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.