importing exporting – How to format data in an excel file?

I would like to format data from drupal, adding some color in specific cells, from an analysis of the retrieved values.

I test “Views Data Export” module (, but from my test :

  • “Excel sheet header” rules work
  • “Excel conditional formatting” rules do not work

I carefully red answers in the topic How to export Views data in separate sheets/tables to Excel file? and the link for PHPExcel (

I wrote the code,

but I did not understand how the hook can be fired.

I also carefully red the link , but no more information.

Is there anybody who can give a complete sample?

Regards, Etienne