We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Null values Grid represented as 0 when exporting

Hi- we've got a table that has a number of columns  with the type defined as number. The content of these columns can be null and when they are null the table in the browser(correctly) displays them as empty cells. However when we export the grid to excel we get the cells that were null populated with zeros- Is this intended behaviour?

4 Replies

PK Prasanna Kumar Viswanathan Syncfusion Team December 22, 2015 10:06 AM UTC

Hi Robert,

Thanks for contacting Syncfusion support.

We are able to reproduce the mentioned changes while exporting. By default, in integer column when we set the dataSource with Null values, the cell will populate with zeros in Excel sheet while exporting.

To avoid this, we can set the type as string in the particular column to get an empty cell while exporting.



Regards,
Prasanna Kumar N.S.V


RD Robert David December 22, 2015 10:08 AM UTC

We also get the problem with decimals. is it good practive to be representing numerical values as strings in the table?


RD Robert David December 22, 2015 10:40 AM UTC

Additionally: when using strings in the column, filtering by the column. When exporting the table to excel the table is sorted alphabetically for example the following column has been sorted descending in the table and has produced the following result when exporting to excel:

96.2629409
93.25285343
9.61327148
9.47740685
9.446485958
9.276378708
9.026081477
82.97987883
82.37982125
80.75906242
8.773920208
8.693145866
8.678890125
8.405866875
79.04322942
74.50158831
70.1720452
7.900583958
7.669883167
7.49610175
7.352031958
7.29212525
7.273757042
7.241993792
7.225266983
68.10413041
67.68120088
65.8746585

The prioritisation of null values does not match between the excel export and the table displayed.  Entries with null values in the table are sorted as null being greater than other values. where in excel they appear at the bottom of columns.


PK Prasanna Kumar Viswanathan Syncfusion Team December 23, 2015 02:14 PM UTC

Hi Robert,

We have created an improvement task for exporting as zero when grid render with empty cell in integer column. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Regards,
Prasanna Kumar N.S.V

Loader.
Live Chat Icon For mobile
Up arrow icon