How to solve message “Invalid file format upload attempt” when importing Magento taxes file?

Yesterday I’ve shared with you some Magento import files for VAT rates

Perhaps you have already faced this kind of message “Invalid file format upload attempt” when importing a Magento taxes file? (I hope because if not, I have a serious problem with my search engine optimization for this blog post 🙂 ).

This problem is due to the control made by Magento during taxes file upload: it expects to find at least the following columns in your file:

  • Code
  • Country
  • State
  • Zip/Post Code
  • Rate
  • Zip/Post
  • is Range
  • Range From
  • Range To

But the problem is Magento use its own translation mechanism to control if these columns exist and compare your header’s columns with the translation for these expected columns in your admin locale: and it raise this error if this is not the same locale.

How to solve the error message “Invalid file format upload attempt”?

To ensure that your upload file has the expected format, two solutions:

Solution 1: Fix your first row columns labels

  • Export your current taxes rules from the back-office menu Sales > VAT > Import and exports taxes
    Screenshot of the menu which allow to import and export taxes rates
  • Copy the first line of this exported file into the one you want to import
  • Import one more time your file

Solution 2: Switch your back-office locale to the one used in your import file

Another solution is for sure to ensure that the locale used in your back-office is the same than the one used in the first row of the file you want to import

This can be done from the select box available at the bottom of your back-office page

Screenshot of the selectbox which allow to update the locale you use in your back-office

Not working?

Well for sure the error message is not very clear 🙂

Check your file format, especially fields separator in your CSV format. If you have any doubt, export your current rules and update it.