magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Order CSV Export Issue with MS Excel #11

Closed magento-engcom-team closed 4 years ago

magento-engcom-team commented 6 years ago

Preconditions

  1. Magento 2.1.10
  2. PHP 7.0

Steps to reproduce

  1. In Admin navigate to the Sales Order grid
  2. Filter the orders according to your needs
  3. Export as CSV
  4. Attempt to open the file in Microsoft Excel

Expected result

  1. The file should open as a spreadsheet.

Actual result

  1. Excel prompts with an error - "Excel has detected that 'export.csv' is a SYLK file, but cannot load it. Either the file has errors or it is not a SYLK file format. Click OK to try to open the file in a different format."
  2. When clicking OK it works for some users and not others. So far it seems to work for Excel for Mac but does not work for Excel on Windows.

Basically Excel sees the first two characters as "ID" and assumed it is a SYLK format. The easiest way to fix this is to change the ID column to have a different label. Locally I changed it to "Order ID" and that fixed the issue. It is a small change for a unique use-case, but I hope we can implement this at some point.

Technically this is a bug with Microsoft Excel, but as it is highly unlikely for them to implement a fix for this as it has been around for a long time I believe, I am submitting this bug as an attempt to work around the unique requirements of Excel.

Original Report: https://github.com/magento/magento2/issues/12473 by @rain2o

sivaschenko commented 4 years ago

The issue cannot be reproduced on the latest Magento codebase: Exported orders CSV is correctly loaded by both Excel and Numbers