Excel export (Use Arabic)

the data appears, and many times it doesn’t workUse ArabicThe problem is exporting excel files without data

  • Do you use PhpSpreadsheet extension?
  • If not, what is the charset of the project? Is it utf-8?
  • What is the encoding of the database table? Is it utf-8?

Do you use PhpSpreadsheet extension?
NOIf not, what is the charset of the project? Is it utf-8?
YES utf-8What is the encoding of the database table? Is it utf-8?
YES utf-8

saleh wrote:

Do you use PhpSpreadsheet extension?
NO

If you are a registered user, you better use it.Otherwise, you should enable Debug and export again and check the log file for errors.

if use PhpSpreadsheet, this code crashes in the excel export and is issued without the colors

// Row Rendered event
function Row_Rendered() {
if ( $this->percentage->CurrentValue <50 ) {
$this->percentage->CellAttrs["style"] = "background-color: #ff0000; color:#ffffff; font-weight: bold";
} elseif ( $this->percentage->CurrentValue < 81 ) {
$this->percentage->CellAttrs["style"] = "background-color: #ffff99; color:#000088; font-weight: bold";
} 	
 else {
$this->percentage->CellAttrs["style"] = "background-color: #00ff00; color:#000088; font-weight: bold";
}
if ( $this->percentage1->CurrentValue <50 ) {
$this->percentage1->CellAttrs["style"] = "background-color: #ff0000; color:#ffffff; font-weight: bold";
} elseif ( $this->percentage1->CurrentValue < 81 ) {
$this->percentage1->CellAttrs["style"] = "background-color: #ffff99; color:#000088; font-weight: bold";
} 	
 else {
$this->percentage1->CellAttrs["style"] = "background-color: #00ff00; color:#000088; font-weight: bold";
}}

So do not use PhpSpreadsheet

There is no errori send my project file and database to support

You code did not “crash”. As said in the notes of the PhpSpreadsheet extension:

This extension does NOT support styling cells.

If you don’t use PhpSpreadsheet extension, Excel reads and parses the outputted HTML. If you have server events, you better check them, make sure the outputted HTML can be parsed correctly or the data region can not be found.

thank you
The problem has been resolved by the support team
The problem is caused by my code HTML