Search code examples
excelsymfonysonata-adminxlssymfony-sonata

SonataAdminBundle exports html instead of xls


I use SonataAdminBundle version 2.2.x@dev (commit 0d310108704c200f1542a00761ad3a884c24deb0) and when I export data in xml format - got html content in .xls file. Other format works well.

Why it can be? Missed dependency on server or bug in particular version?


Solution

  • It looks like sonanta has always done that. Xls are created by generated html compatible file.

    The problem come from a recent office update which block html content for security reason. You should take a look at this for more information : Excel refusing to open files