Forums

CF5-XLSExport--> DataPath?

stycer 07 Feb, 2014
Hi all,
I am a rookie, I have to admit.
maybe someone can help me with a (propably) simple question:

At the XLSExport (linked to the form submit event) the 1rst field is requesting the 'Data Path'.
Help text:
The data path under the form's data array, you may use dots to reference sub array value, e.g: Model.sub_Model.

What input is expected here?
and/or
Can I find a documentation about CF V5 somewhere?

Best regards,
stycer
sk8connection 07 Feb, 2014
i have the same question, can you give an example for Data Path?
stycer 09 Feb, 2014
Nobody can help?
@Sk8connection: please post a solution , If you have any. I tried several ways, but it didn't work.

Best regards,
Stycer from Hamburg
sk8connection 09 Feb, 2014
my solution was to use CSV export. But there the data path was equal to the entry in the db save action in the setting model id. I put just the word infodata in the db save and in the csv export action under data path an it worked.

but there i have another problem, i cannot find out what is the separator between the entrys in the columns setting i tried ; , space pipe . : but none with success. !?!

Anyone a tipp on that?
stycer 10 Feb, 2014
pls find attached my csv setting.
I suggest you already exported the whole db ?

[attachment=0]Zwischenablage-1.jpg[/attachment]

On the other hand - the csv file won't be saved on the server, or is there a solution to save the file in a defined server path?

The excel export gives the opportunity to save it at a specific location, but with the same input for data path, there will be no file written. Maybe that is simply a bug ?
The excel export simply doesn't work?

Any help from admins here or experienced users?

Best regards,
stycer
stycer 12 Feb, 2014
OK, I have a work-a-round.

My intention was, that user can open all registries, which have been done by a form in a simple user-friendly way.

By changing the CSV delimiter to semicolon, Excel is opening a csv file directly as it would be a XLS or XLX file.
To change the delimiter for CF V5 Bob has posted a solution here:
http://www.chronoengine.com/forums/posts/f2/t94391/csv-export-delimiter.html.

BR
stycer
sk8connection 15 Feb, 2014
Answer
I found the solution, you must first add a READ DB action in the on submit event, there you set the table name you like to export, then you choose multi read, and enablem model id: yes, and under Model ID: Data
Then under the XLS Export action under Data Path you enter as above: Data , then add the list of your fields and labels, and say Add BOM: yes.

For me it worked better than csv export, because on Mac's the UTF-8 special characters äüö are not properly displayed but with the els export it worked like a charm!

Hope it helps.

Cheers
sk8connection
stycer 15 Feb, 2014
Hi,
thanks for posting!
I still would prefer the xls file :-)
and with your hints I am getting closer, but it seems that my input for "Save path" seems to be wrong.
I tried
empty field, / and several paths from my server.
Do you have another hint about which syntax the field is requesting?

BR,
Stycer
sk8connection 15 Feb, 2014
i have no clue about the path, but i made another form for the download with just a submit button which i renamed to Download, then in the setup i created the mentioned DB Read and XLS Export actions, then in joomla i made a menu entry pointing to that form, with the right permission for my user group, so only they can see and click the download button created above. Works nice.
GreyHead 17 Feb, 2014
Hi stycer,

The path should be a valid folder path on your server ending in a separator e.g. /, and I guess that the Joomla! User needs to have write permission to create a file there.

Bob
stycer 18 Feb, 2014
Hi Bob,
thx for your hint.
For test purpose I created a folder on second level called 'test'.
Public read AND write rights (766).

I addressed the path by
http://www.mydomain.de/test/

But no excel file inside...

Any ideas by anyone?

Best regards,
stycer

PS: My Joomla version is linked under
www.mydomain.de/XXX_Joomla/
GreyHead 18 Feb, 2014
Hi stycer,

This: http://www.mydomain.de/test/ is a URL- not a folder path :-(

Bob
GreyHead 18 Feb, 2014
HI both,

The Data Path in CFv4 and v5 shows how the data relates to the main $form->data array,

+ If you want to use all the form data, then leave it empty.

+ If your data is in a sub-array of the $form->data array e.g. $form->data['my_data'] then the Data Path is my_data

+ If your data is in a sub-sub-array of the $form->data array e.g. $form->data['my_data']['row_2'] then the Data Path is my_data.row_2

Typically the data comes from a DB Read action and the Data Path will usually be the same as the Model ID you set up there.

Bob
This topic is locked and no more replies can be posted.