Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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."
Comment | File | Size | Author |
---|---|---|---|
#24 | vde_excel_plugin-1728650-24.patch | 4.5 KB | Daluxz |
| |||
#12 | vde_excel_plugin-1728650-12.patch | 4.42 KB | davidraijmakers |
#11 | vde_excel_plugin-1728650-11.patch | 4.54 KB | davidraijmakers |
#4 | vde_excel_plugin-1728650-1.patch | 4.42 KB | Drupa1ish |
#1 | export_error.PNG | 10.25 KB | Barrett |
Comments
Comment #1
Barrett CreditAttribution: Barrett commentedI get the same error/warning in 6.x-2.0-beta6. Screen grab of the message is attached.
Comment #2
Elanadi CreditAttribution: Elanadi commentedSame 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!!!
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedSadly 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.
Comment #4
Drupa1ish CreditAttribution: Drupa1ish commentedThe 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
Comment #6
Drupa1ish CreditAttribution: Drupa1ish commentedComment #7
Drupa1ish CreditAttribution: Drupa1ish commentedComment #10
bisonbleu CreditAttribution: bisonbleu commentedTried 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
Comment #11
davidraijmakers CreditAttribution: davidraijmakers commentedI updated the patch for the 3.9 version adjustments
Comment #12
davidraijmakers CreditAttribution: davidraijmakers commented@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
Comment #13
davidraijmakers CreditAttribution: davidraijmakers commentedComment #17
drushAmazon CreditAttribution: drushAmazon commentedHey 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.
Comment #18
drushAmazon CreditAttribution: drushAmazon commentedPlease 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.
Comment #19
davidraijmakers CreditAttribution: davidraijmakers commentedDo 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?
Comment #20
drushAmazon CreditAttribution: drushAmazon commented@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?)
Comment #21
drushAmazon CreditAttribution: drushAmazon commentedInstalled 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.
Comment #22
davidraijmakers CreditAttribution: davidraijmakers commented@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 ?
Comment #23
davidraijmakers CreditAttribution: davidraijmakers commentedComment #24
Daluxz CreditAttribution: Daluxz at iO commentedI re-rolled the patch so it applies to the 7.x-3.2 version.
Also fixed some minor coding standards issues.