Forums

Export to XLS

efh68 19 Jan, 2018
I have read through topics on this, but I am still really lost in with the Export XLS feature in Chronoforms V5. I understand that first I need to set up a DB Read action. Does this go in the "On Load" or "on Submit". I currently have it in the "on submit" with the following settings.

Action Label: readvol
Enable: Yes
Table Name: set to my volunteer form table
Multi read: No
Enable Model ID: Yes
Model ID: Data15
Fields: this is left blank (I want all the fields returned)
Order: this is also blank
Group: Blank
Conditions: blank

The XLS Export is in on Submit with the following setting:

Enabled: Yes
Data Path: Data15
Fields list: blank
Headers list: blank
File name: cf_export.xls
cf_export.xls: blank
Before headers: blank
Save file ? Yes
Save path: /images
Add BOM ? No

Do I need to create the cf_export.xls or does chronoforms do that?

The form fields have custom Field Name and Field ID (ex: Name is set to Field Name: name and Field ID: name)

Thanks for any help you can offer or direct me to a tutorial or documentation.

Ed
efh68 19 Jan, 2018
Ok, I found my first problem the DB Read needs to go before the Render HTML
efh68 19 Jan, 2018
In the debugger I am getting

[19] => Array
(
[XLS Export] => Couldn't create save folder: images/exports
)

I have check the file permissions on the exports folder and they are set to read/write
efh68 19 Jan, 2018
Moved everything to the on submit and now the xls file is being generated but is blank and on opening the file it states the the file could be corrupted and if I trust the file source. Getting closer.
This topic is locked and no more replies can be posted.