it2be_data excel export in ngclient

Questions and answers on developing, deploying and using plugins and JavaBeans

it2be_data excel export in ngclient

Postby marco.rossi » Tue Feb 04, 2020 1:02 pm

Hi all,
I have this simple function to export a dataset in excel which is properly working on SmartClient but not on NGClient.

Code: Select all
function exportToExcel(dataSet, headers){

   var file = plugins.file.createTempFile("export",".xls");   
   var fileName = file.getAbsoluteFile();
   var excelDoc = plugins.it2be_data.createExcel();
        excelDoc.write(fileName.getAbsolutePath(), headers, dataSet)

By going on the plugin page ( ... ata-plugin), I see it's marked as compatible with NGClient.
This is the api page where it's specifically marked as NGClient compatible as well: ... tion_write

Unfortunately the examples here are outdated (the function plugins.it2be_data.excel().write(filePath.getAbsolutePath(), dataset) is not used anymore).

I know how to export a dataset without using this plugin but this would mean to put hundreds of forms in QA.
Does anyone know how to make this plugin working on NGClient??

Thank you for your time

Marco Rossi
Senior Analyst Developer
Freelance Consultant

IT Manager @Mantho
Webmaster @Sitoliquido
Posts: 101
Joined: Sun Apr 12, 2015 9:33 pm

Re: it2be_data excel export in ngclient

Postby sean » Tue Feb 04, 2020 4:52 pm

Hi Marco,

That is a 3rd-party plugin, so you may want to contact the vendor directly.
Did you get any errors? If so, paste them here.

Also keep in mind that an working with files in NGClient is different than SmartClient as all paths will be relative to the server's file system.
Software Engineer
Servoy USA
Posts: 289
Joined: Mon May 21, 2007 6:26 pm
Location: USA

Re: it2be_data excel export in ngclient

Postby swingman » Tue Feb 04, 2020 5:13 pm

Hi Marco,

The NG-Client does not have access to the file system, so
Code: Select all
excelDoc.write(fileName.getAbsolutePath(), headers, dataSet)

does not make sense. Try putting in a simple filename instead.

Code: Select all
excelDoc.write(fileName, headers, dataSet)


Code: Select all
excelDoc.write("test.xlxs", headers, dataSet)

If successful you will end up with a download in your Downloads directory or wherever your browser saves downloaded files.

Christian Batchelor
Certified Servoy Developer
Batchelor Associates Ltd, London, UK - The world's most advanced open source database.
User avatar
Posts: 1377
Joined: Wed Oct 01, 2003 10:20 am
Location: London

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 2 guests