gustavnavar / Grid.Blazor

Grid component with CRUD for Blazor (client-side and server-side) and ASP.NET Core MVC
GNU Lesser General Public License v2.1
697 stars 135 forks source link

Excel export dropping leading zeroes #329

Closed GodfreyHlongwane closed 1 year ago

GodfreyHlongwane commented 2 years ago

Describe the bug I am using Grid Blazor to display data from an SQL Database. All fields displayed are stored as varchar in the database. I have a field called serial number which is displayed as follows:

image

upon exporting the field, the zero at the beginning of the string is lost. I tried formatting it without success

image

This is the view I get in excel after exporting:

image

I expected the export to display data as is. Not sure if anyone has a solution available that can assist me.

I am running a Blazor.net project with GridCore 5.0.3

gustavnavar commented 2 years ago

You can apply the 000000000000 format to the D column directly in Excel

tony-asu commented 1 year ago

This might be fixed thanks to the fix for #362

Assuming the data with leading 0's is a string