0

I have use the code below to find if cell content has been underlined or not using phpexcel

$inputFileType  =PHPExcel_IOFactory::identify($file);
$objReader      =PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel    =$objReader->load($file);
$checkUnderline =$objPHPExcel->getActiveSheet()->getStyle($col.$row)->getFont()->getUnderline();

The answer will be either 'single' or 'none'. Now, I would like to know how to do this using PHPSpreadsheet.Thank you.

Premlatha
  • 1,676
  • 2
  • 20
  • 40

1 Answers1

0

This code works. This link has helped me. (Read Xlsx file in PhpSpreadsheet)

    $inputFileType  =\PhpOffice\PhpSpreadsheet\IOFactory::identify($file);
    $objReader      =\PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
    $objPHPSpreadsheet           =$objReader->load($file);      
    $cellcontent_underlinestatus =$objPHPSpreadsheet->getActiveSheet()->getStyle($col.$row)->getFont()->getUnderline();
Premlatha
  • 1,676
  • 2
  • 20
  • 40