If the header of the first column of your CSV is "ID", Excel will complain when opening the file.

The file format and extension of 'file.csv' don't match. The file could be corrupted or unsafe. Unless you trust its source, don't open it. Do you want to open it anyway?

Excel has detected that 'file.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.

This is document at https://support.microsoft.com/en-us/kb/323626. The solution is to wrap "ID" in quotes.

While I acknowledge that this is a ridiculous Excel issue I believe it would be quite common to have ID as the first column header and a workaround could be provided in this module.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mstrelan created an issue. See original summary.

Vernit’s picture

Although Header values should be in camel case. So i have submitted the patch for if mistakenly putted the ID or all uppercase values in headers.

Vernit’s picture

Assigned: Unassigned » Vernit
Status: Active » Needs review
Vernit’s picture

Version: 8.x-1.x-dev » 8.x-2.0-beta1
Vernit’s picture

grasmash’s picture

Status: Needs review » Needs work

Why is the solution to change everything to uppercase? Shouldn't you be checking to see if the first column header is ID and then conditionally modify it?

Vernit’s picture

You may be right but my recommendation, Column header's character of each word should be uppercase. There are may be chance with other words in xls that breaks the functionality.

Vernit’s picture

Status: Needs work » Needs review
steinmb’s picture

Version: 8.x-2.0-beta1 » 8.x-2.x-dev
markdorison’s picture

Status: Needs review » Closed (outdated)

Please reopen with a merge request against 4.x if this issue is still relevant.