Is there a way to get rid of this error message when opening an XLS file in Excel? "The file you are trying to open, [filename], is in different format than specified by the file extension."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Barrett’s picture

FileSize
10.25 KB

I get the same error/warning in 6.x-2.0-beta6. Screen grab of the message is attached.

Elanadi’s picture

Same problem. Drupal 7, 7.x-3.0-beta6 version. Everything works fine except the error message appears. Other than that, this is a FANTASTIC module!!!

Steven Jones’s picture

Status: Active » Closed (won't fix)

Sadly this is because we are using a very old form of the microsoft file formats and this is basically the way that it tells you that the file format is deprecated. There's not much we can do, but someone else is free to write a plugin that extends VDE to generate proper XLS files.

Drupa1ish’s picture

Issue summary: View changes
Status: Closed (won't fix) » Needs review
FileSize
4.42 KB

The existing settings xls doesn't really export in excel format, just html ( See #1008246-5: XLS-output is not recognised by Excel 2007 The “xls file is basically just a HTML table in a very simple HTML document that excel can understand.”)
We have setup a new settings format called “Excel”, that outputs real Excel files.
The new plugin does a tricky thing, by using the same handler as .csv format, only there is a condition at the end, transforming the .csv file into an Excel File, using the PHPExcel library ( https://phpexcel.codeplex.com/) In this respect, there is a new dependency to libraries module and PHPExcel library ( but we don’t need https://www.drupal.org/project/phpexcel)
This is not the classic approach, like #1165366-19: Allow using PHPExcel library for better output portability which has errors, but is very reliable and simple.
Still todo: Options for Excel5 and Excel7, there is only default Excel5
Tested against 7.x-3.0-beta8

Limitation: Works only with batch enabled

Status: Needs review » Needs work

The last submitted patch, 4: vde_excel_plugin-1728650-1.patch, failed testing.

Drupa1ish’s picture

Version: 7.x-3.0-beta6 » 7.x-3.0-beta8
Drupa1ish’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: vde_excel_plugin-1728650-1.patch, failed testing.

bisonbleu’s picture

Tried path in #4 as I need to export 'real' Excel files. The exported file is recognized as a genuine Excel file. But although I can see the content in Views' preview, the outputted file is always empty :-(

- patch was successfully applied to 7.x-3.0-beta8
- Batch Export is enabled
- I have flushed the caches numerous times

davidraijmakers’s picture

I updated the patch for the 3.9 version adjustments

davidraijmakers’s picture

@bisonbleu i've fixed the patch with your problem. It couldn't find the version in the file so i hardcoded the version number.
Also i've removed the headers so it will work again

davidraijmakers’s picture

Status: Needs work » Needs review

The last submitted patch, 11: vde_excel_plugin-1728650-11.patch, failed testing.

The last submitted patch, 11: vde_excel_plugin-1728650-11.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 12: vde_excel_plugin-1728650-12.patch, failed testing.

drushAmazon’s picture

Hey can anyone let me know the status of this issue. Is this issue is fixable or not..??

It seems that above patches are totally failed and even the new version of this module have same issue.

What will be the alternatives solutions we can expect.

drushAmazon’s picture

Please let us know the status of this patches. is it workable or not.?

I applied the different patches but it's not working even the new version have the same issue.

davidraijmakers’s picture

Do you have the latest version of the PHPExcel library (i think 1.8.2 installed) ?
Which OS are you using and which version of Excel?

drushAmazon’s picture

@davidraijmakers

PHP verstion: 5.2.17

Drupal verstion: core 7.14

View data export module verstion: 7.x-3.0-beta8

win OS: windows 8

Excel version : Excel 2007

Note: I checked no PHPExcel library installed yet in sites/all/libraries (is it required?)

drushAmazon’s picture

Installed now PHPExcel 1.8 inside libraries and applied the patch mentioned in #4 but it's not working.

The message "The file you are trying to open, [filename], is in different format than specified by the file extension." still there.

davidraijmakers’s picture

@drushamazon

Yes this library is required in sites/all/libraries. Please read https://www.drupal.org/node/1728650#comment-9128401
Did you set the 'Format' as 'Excel file'?
And the export options to 'Export as file' with the extension: %view.xls ?

davidraijmakers’s picture

Status: Needs work » Needs review
Daluxz’s picture

Version: 7.x-3.0-beta8 » 7.x-3.2
FileSize
4.5 KB

I re-rolled the patch so it applies to the 7.x-3.2 version.
Also fixed some minor coding standards issues.

Status: Needs review » Needs work

The last submitted patch, 24: vde_excel_plugin-1728650-24.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.