excelxport plugin - how does it work?

I’ve been trying to get the excelxport plugin to work, but I think I’m missing something.
There’s a foundset on my form and then I run this script:

var fs, dp, file, bytes;
fs = forms.form_report.foundset;
dp = ["debnr","company_name"];
file = plugins.file.showFileSaveDialog("ServoyExport.xls");
bytes = plugins.excelxport.excelExport(fs, dp);
plugins.file.writeFile(file, bytes);

It prompts to save the file but when I open the Excel file there’s ony the header with the specified column names and no data.
What am I doing wrong?

Regards,

Marco

Is your foundset empty?
Do you need to do a fs.loadAllRecords() ?

Hi Thomas,

No, my foundset isn’t empty.
Do you know if the column names in Excel should match the column names in the database?

Regards,

Marco

yes, they should match!