简体   繁体   中英

PHPOffice/PhpSpreadsheet: Reset cell style

In the docs

i didn't find any useful function for my need.

Is it possible to "reset" / "delete the entire formatting" of a single cell? Return the cell to its original state.

explicitly undoing the previous format should work:

$ws->getStyle('A1')->applyFromArray(array(
    'font' => array('bold' => false)
));

when importing, one can also skip formats altogether: $reader->setReadDataOnly(true);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM