# it2be\_data excel export in ngclient

**URL:** <https://forum.servoy.com/t/it2be-data-excel-export-in-ngclient/20179>\
**Category:** Questions\
**Created:** [February 4, 2020, 11:02am UTC](https://forum.servoy.com/t/it2be-data-excel-export-in-ngclient/20179 "2020-02-04T11:02:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco.rossi](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@marco.rossi](https://forum.servoy.com/u/marco.rossi)\
**Post date:** [February 4, 2020, 11:02am UTC](https://forum.servoy.com/t/it2be-data-excel-export-in-ngclient/20179/1 "2020-02-04T11:02:39Z")

</div>

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

```auto
function exportToExcel(dataSet, headers){

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

```

By going on the plugin page ([https://servoycomponents.com/components … ata-plugin](https://servoycomponents.com/components/plugins/data-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: [http://software.servoycomponents.com/do … tion\_write](http://software.servoycomponents.com/documentation/data/idexcel.html#function_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

---

<div class="post-metadata">

**Author:** ![sdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/sdevlin/32/4488_2.png) [@sdevlin](https://forum.servoy.com/u/sdevlin)\
**Post date:** [February 4, 2020, 2:52pm UTC](https://forum.servoy.com/t/it2be-data-excel-export-in-ngclient/20179/2 "2020-02-04T14:52:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![swingman](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/swingman/32/4536_2.png) [@swingman](https://forum.servoy.com/u/swingman)\
**Post date:** [February 4, 2020, 3:13pm UTC](https://forum.servoy.com/t/it2be-data-excel-export-in-ngclient/20179/3 "2020-02-04T15:13:34Z")

</div>

Hi Marco,

The NG-Client does not have access to the file system, so

```auto
excelDoc.write(fileName.getAbsolutePath(), headers, dataSet)

```

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

```auto
excelDoc.write(fileName, headers, dataSet)

```

or

```auto
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
