Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Got invalid XLSX file, when symbol "&" happens in any field. Think it can be connected with XML restrictions.
Comments
Comment #1
d.novikov CreditAttribution: d.novikov commentedThe issue appeared due to
è
symbol in the data. Note, that Microsoft Excel opened file normally, but Google Docs and Libre Office - didn't. When I manually placedÈ
instead ofè
, things had gone ok in Libre Office.Probably the reason lays in php-excel.class.php, contributed with a module:
Result of htmlentities() output depends on PHP version and flags combination: php.net/manual/en/function.htmlentities.php#103486
Comment #2
creaoy CreditAttribution: creaoy commentedDuplicate 897830
Comment #3
sdjewani CreditAttribution: sdjewani commentedi am using the same file, to export in excel, but i have a problem that html entities appears encoded , i want decoded html entity, any buddy can suggest how can i.
Comment #4
creaoy CreditAttribution: creaoy commentedCan you please provide more details? I will need data to test?
This was fixed in latest dev.
Comment #5
sdjewani CreditAttribution: sdjewani commentedthis is snap of my code
$v = htmlentities($v, ENT_COMPAT, $this->sEncoding);
$cells .= "" . $v . "\n";
this is working fine except it returns html entity code without converting it as " Immunomodulatory Drugs (IMiDs & # 8482;):"
but it should be like "Immunomodulatory Drugs (IMiDs™):".