I can create an exported file but cannot open with Excel because I get this error: "This file is corrupt and cannot be open."

If I open with an editor I see that there is a blank line at the top and four spaces on the second line. If I remove these I can open the file with Excel. (See screenshot.)

What needs to be changed to remove these blank spaces so the file can be open without having to be fixed? I tried the following:

"Make first row a list of column headers" checked and unchecked
"Trim whitespace from rendered fields. Can be useful for some themes where output results in extra newlines." checked and unchecked
All other options checked and unchecked

CommentFileSizeAuthor
2014-01-22_1858.png2.75 KBkappaluppa
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MustangGB’s picture

Category: Bug report » Support request
Status: Active » Fixed

I had this on one of my environments, turns out it was caused because during bootstrap module_load_all() goes through all modules, including contrib, and loads them. I had a contrib module with some whitespace before the "<?php" at the start of the file, and this whitespace was appearing on every page load, including views data export pages/files.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.