own xls export function

Hi Eugenio,
I already realized a xls-Export by creating an independent PHP-file in which everything is read from the database manually and afterwards put in a xls-file that is downloaded automatically.
I would like to establish this function as a substitute for the csv-Export.
My particular interest is exporting tables that has been filtered before by the built-in filter function or search-function.
My question is: Is there a way to address the results-table of such filter or search that is shown? I would like to take those tables and parse them to create the apropriate xls-file afterwards. I have no idea how to manage that with PHP. I already thought about a javascript function.
Do you have a hint for me?

Thanks in advance
Andreas

You are using DaDaBIK version 8.1-Lerici enterprise, installed on 11-12-2017 (installation code: 124685910a21b35192), the latest version of DaDaBIK is 8.1-Lerici released on 09-05-2017
You are runnning the last release of DaDaBIK
PHP Version: 5.5.30
mysql version: 5.6.19-67.0-log
Web server: Apache
Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0
 

eugenio

Administrator
Staff member
Hello,
about the PHP script you created: is it something you have already integrated in DaDaBIK or you built it in another context?

What does the script do in addition to the standard CSV export? Maybe it would be easier for you to get in input the CSV file created by dadabik and then build the excel file the way you want.

The code related to the CSV creation is in index.php, starting from:
if(isset($export_to_csv) && $export_to_csv == 1 && $export_to_csv_feature == 1) {

The "where clause" that filters the record is stored in $where_clause (not only user's filters, it also includes additional filters such as the one required for the ownership permissions).

Best,
 
Top