Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in XLS file format??? #7

Open
mattslay opened this issue Feb 11, 2013 · 3 comments
Open

Error in XLS file format??? #7

mattslay opened this issue Feb 11, 2013 · 3 comments

Comments

@mattslay
Copy link

2013-02-10_22-20-36
2013-02-10_22-18-57
When I call for the XLS format, it downloads a file to my Downloads folder, but when I try to open that file with Excel 2010, I get this error message:

"The file you are trying to open, 'test-report_02-10-2013_22-07-06.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?"

(I'm developing the Rails app on a Mac, but my users will be using Excel on a Windows machine to view this spreadsheet.)

If I click on YES, the file actually does open up just fine, so I guess it's no great issue, however, I can see that this could be very concerning to some users.

I also tried opening the file on my Mac using Libre Office, but I also get an error:
"General Error. General input/output error."

However, Libre Office is not as forgiving as Excel, and it on has an OK button for that error message, and it does not open the file.

@nathanl
Copy link
Contributor

nathanl commented Feb 11, 2013

Matt,

Thanks for pointing this out.

We are currently generating the excel format manually, and apparently it's harder than it originally seemed to do it in a way that makes Excel happy.

We have on our roadmap the goal of switching to using the roo gem for this. It would support more output formats and probably would do a better job with Excel, too.

If you want to take a crack at it, that would be great. If not, this issue will serve as one more reason for us to get around to converting soonish.

@mattslay
Copy link
Author

RailsCasts (Ryan Bates) has a nice video on Excel exporting.

http://railscasts.com/episodes/362-exporting-csv-and-excel

I'm not sure if anything in that video would be of help or not. I don't think my current skill level qualifies me to be of much help. I'm a good tester, but that's about all for now.

@mattslay
Copy link
Author

P.S. I added a comment on that video pointing here as an alternate way of exporting CSV, Exce, JSON, and HTML.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants