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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Null values Grid represented as 0 when exporting

Thread ID:

Created:

Updated:

Platform:

Replies:

121501 Dec 21,2015 05:05 PM UTC Dec 23,2015 02:14 PM UTC ASP.NET MVC 4
loading
Tags: Grid
Robert David
Asked On December 21, 2015 05:05 PM UTC

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?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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

Robert David
Replied On 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?

Robert David
Replied On 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.

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;