Extension Error When Exporting Report in XML or CSV

Submitted by Eric on Thu, 03/29/2018 - 21:05
excel banner

Hello everyone, we have another new tutorial for you to fix a possible problem in your store.

Have you ever come across the problem of when exporting your report in XML or CSV the file comes with an extension like this:

  • invoiced.csv-, attachment
  • invoiced.xml-, attachment

Well, this is quite common for you to use some versions of Magento and also some versions of some browsers. The solution is quite simple.

Open file: app/code/core/Mage/Core/Controller/Varien/Action.php


->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'"', true)


->setHeader('Content-Disposition', 'attachment; filename="'.$fileName.'";', true)

Done, refresh cache and test again.

Until the next tutorial here on MageBR.


Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.