I'm using Chronoforms on Joomla 1.5. I have the same exact site at two different hosts. At host 1 (Siteground), my data will export to both Excel and csv files. At host 2 (Hostgator), the same data will not export to Excel; it exports only to csv.
I can just accept that fact, but I'm curious why I can't get the same data from the same programming files to export from host 2 to Excel. I've read through some other posts here, and even tried to follow the advice at http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=3&t=18085&p=53956&hilit=export+to+excel#p53956, but that didn't help.
When I try to export to Excel, I get a message from Excel that the data is unreadable, that the damage to the file is so extensive that repair is impossible, and that some data may have been lost or corrupted. And indeed, when the spreadsheet appears, some data is lost and corrupted, although other data remains intact. The data is not voluminous (less than 20 records) and consists of names and email addresses, so it's not a complex spreadsheet.
Are there any suggestions or fixes out there?
Thank you.
Are there any suggestions or fixes out there?
Change hosts?Seriously, there seem to be many things that can affect the Excel export (ChronoForms uses a standard ExcelWriter library from PEAR to do the export). These include:[list]
Bob
"According to http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=15584 , memory limits can cause such corrupt Excel files as this option needs more memory. However, I tried disabling the Apache memory limit (100 MB) temporarily and checked. Excel file still came out corrupt. But the file for "jos_chronoforms_Gmail_Directory" which has 5 records was downloaded without any issue.
Your account can use upto 100MB Apache memory and 64MB PHP. Could you check with the developer if the extension would be able to generate excel for large data with this much resources ?"
Here is what I said to my host in response:
"I will check with the developer.
I created a database with 1 record, and it exported to Excel without a problem. The "largest" database I have is the jos_chronoforms_Gmail_database1. It has 180 records. If I export those records to csv, the file size is just 38 kb.
The 1 record that I successfully exported to excel is only 14kb in size. If I had 200 records, the size would be 2800 kb or 2.8 MB, still within the 100 MB limit, so it doesn't seem that size is the problem.
But I will let you know what the developer says."
So, if you don't mind the question that my host asks, is Chronoforms able to generate excel for large data with the resources that my host provides?
"Probably the best information to ask for would be the system requirements of the application. We can then check to see if our platform has all of the required dependencies, or if something else needs to be installed.
Recently, our Shared and Reseller systems were just synchronized against a central image host, so this may have resulted in fewer application modules (e.g. Perl) being readily available. Generally, if a dependency is needed, we can install it.
It sounds as though a particular library, probably one that handles excel-formatted files, is missing or needs to be updated."
Any suggestions about system requirements (which I don't understand) would be helpful to my host.
Thank you.
There are no good answers to those questions. The resources should be more than enough to export a reasonably sized file. The docs for ExcelWriter don't seem to offer much help here.
There is a long thread here that discusses some problems and suggests some solutions but none seem to be universal. It's hard to know what to suggest to you.
Corruption after a few records suggests a possible problem with special characters in the files. If this is so then the export should stop at the same place each time.
Memory problems are real as the code is implemented in ChronoForms to read the whole data set into memory and then to construct the Excel File also in memory. I have got round this by hand-coding an export routine that read a block of 1,000 records at a time, and writes the results to file line by line. Doing this I have successfully exported complex files many thousands of records long.
Bob
The advice from Max in this post:
http://www.chronoengine.com/forums/index.php?option=com_chronoforums&cont=posts&f=2&t=16363&p=43350&hilit=comment+excel#p43350
solved my Excel export problem. My host (Hostgator) figured this out for me by finding this post and following the advice.
Thanks for your help on this, too.