Sunday, January 1, 2012

Getting error "File Error: data may have been lost" while using spreadsheet and exporting excel

I am using "Spreadsheet" gem with Rails 2.3.8. Microsoft Office 2007 is installed on my system.
I successfully fitted the code snippets in one of my controller.
I just wrote the code to create Worksheet and pushed one row record in it.
Number of records pushed in that row is around 330.
When I export the spreadsheet/excel, I got following error:



"File Error: data may have been lost"

Clicked on Ok and it created the excel file with the File Type "Microsoft Office Excel 97-2003 Worksheet" with one sheet having 1 row.
When closely analyzed the sheet, I found that Number of maximum columns that can be in that sheet is only 256 and as I was trying to have around 330 columns hence I was getting the error.

1 comment:

  1. Try to use repair Excel file corrupted by viruses, hard drive failures, errors in transferring the file via the LAN or the Internet. Tool reads corrupted files and exports recovered data into Microsoft Excel or new *.xls(x) file not changing original corrupted file.

    ReplyDelete