Export foundset to Excel

Hello everybody!

First you may have noticed, that I’m a total “Servoy beginner”. So please do not laugh about me and my maybe primitive problems. :wink:

I’ve tried to export a form.foundset to Excel. Look at my way I tried:

function excelExport {
  var fs, dp, file, bytes
  fs   = forms.frm_kunden.foundset; 
  dp   = ["kontakt","itemkzbez"]; 
  file = plugins.file.showFileSaveDialog("ServoyExport.xls"); 

  bytes = plugins.excelxport.excelExport(fs, dp); 
  
  // that's it -> don't know to go on
}

Everything works fine, but I don’t know and did’t find out, how to proceed? :(

So, I ask you: How can I get my “bytes” to my “file”?

Thanks! MIKE

P.S.: I’m using Servoy 6.

ich:
How can I get my “bytes” to my “file”?

For that you can use the file plugin:

plugins.file.writeFile(file, bytes);

Oh yes! :P

THANKS!