Hello,
I am exporting a grid using: $.ig.GridExcelExporter.exportGrid(...);
My grid have null values in columns of type datetime, number, so on.
When I export the grid, the null fields appear fill with the before values concatenated.
How I keep the null fields empty?
Thanks you and kind regards.
The expected behavior is that the cells in the Excel worksheet will be empty when exporting null values or missing values. Please see an example of this behavior at this fiddle.
You can compare this to your sample to find out what is causing the exporting on your side to export other values.
Please let me know if you have other questions on the matter, I will be glad to help.
Thanks Hristo, I update the library (I was using 1.16.2 and now I use 1.17.2), and the problem is solved.
But appear js errors in lenguage js (/Scripts/Infragistics/js/i18n/infragistics-es.js): Cannot read property 'Notifier' of undefined
Can you help me?
Send you my links to js I am using (v1.16.2). The order is important, true?
Scripts/Infragistics/js/i18n/infragistics-es.jsScripts/Infragistics/js/infragistics.core.jsScripts/Infragistics/js/infragistics.lob.jsScripts/Infragistics/js/infragistics.dv.jsScripts/Infragistics/js/infragistics.loader.jsScripts/Infragistics/js/modules/i18n/regional/infragistics.ui.regional-es.jsScripts/Infragistics/js/modules/infragistics.documents.core.jsScripts/Infragistics/js/modules/infragistics.excel.jsScripts/Infragistics/js/modules/infragistics.gridexcelexporter.jsScripts/FileSaver.min.js
Sorry and regards
Hello Sergio,
There is some differences in the necessary resources for 17.2, due to modularization of the excel.js file and this may lead you to issues. Any time you are not sure about that you can reference to the samples in our Ignite UI Samples website and the igGridExcelExporter overview topic.
According to those documents, you need the following resources to use the igGridExcelExporter:
<script src="igniteui/js/infragistics.core.js"></script><script src="igniteui/js/infragistics.lob.js"></script><script src="igniteui/js/infragistics.excel-bundled.js"></script><script src="igniteui/js/modules/infragistics.gridexcelexporter.js" type="text/javascript"></script>
Please also note that you do not need loading the infragistics.loader.js file and ou can safely remove it.
Do not hesitate to contact us if you have further questions.
Thank you Hristo, but my problem when I update is in Scripts/Infragistics/js/i18n/infragistics-es.js
The component isn't in spanish and we have a js error
Hi Sergio,
If all resources are loaded you are not expected to get a js error. For localization, in adittion to loading the "es" files, you need to tell the igGrid component to be localized (help topic on localization)
$("#grid1").igGrid({ language: "es", regional:"es-ES",
I am attaching a sample that uses the resources I have pointed out and is localized in Spanish, please refer to it and let me know if you have further questions.Exporter.zip
I want all componets in spanish.
I had tried:
$.ig.loader({ scriptPath: "">cdn-na.infragistics.com/.../", cssPath: "">cdn-na.infragistics.com/.../", locale: "es", regional: "es-ES" });
but the grid is in english.
Sorry for the incovenients and thank you for your help.
This answer is perfect.
Thank you very much
I have investigated in detail the differences between 16.2 and 17.2. The matter is the implementation of localizing in 17.2 has changed to ease the developers, so what worked for 16,2 is not expected to work for 17.2.
Below I will review the process of localizing all controls on the page:
1) Load the necessary locale resources using the igLoader:
$.ig.loader({ scriptPath: 'localhost/.../', cssPath: 'localhost/.../', resources: 'igGrid.*, igCombo', locale: 'es', regional: 'es' });
2) Set the regional/language options globally for all controls on the page:
$.ig.loader(function () { $.ig.util.changeGlobalRegional("es"); $.ig.util.changeGlobalLanguage("es");....});
I am uploading a sample where this is demonstrated and both the igGrid and igCombo on the page are localized in Spanishgrid+combo_localized_17.2.html.zip
My suggestion is more like an immediate solution that I could give you at the moment.
I will take the time to investigate why there are differences between 16.2 and 17.2 and will update you about my findings. It may turn out my solution is not complete or proper or there is a mistake in our code.
I will update you tomorrow by the end of the day on that matter.
Thank you very much.
I will think if update the version.
I have many grids, dialogs... and set the attributes language and regional in all them is a hard work.
Regards
Exporter_2017.2.html.zip
It turns out the igLoader is told what locale resources to load, and the igGrid itself still needs to be told which if these locales to use:
$.ig.loader({ scriptPath: 'cdn-na.infragistics.com/.../', cssPath: 'cdn-na.infragistics.com/.../', resources: 'igGrid.*,' + 'igGridExcelExporter', locale: "es",});
$.ig.loader(function () { $("#grid1").igGrid({ language: "es", regional: "es-ES", ...
I have modified your sample with the 2017.2 version
Please let me know if you have further questions, I will be glad to help.