I have a gridview containing columns Payee Name, A/c No., IFS Code, Bank Name, PAN No., Amount.
Column Name A/c No. has values contaning more than 15 digits.
So after exporting this gridview column A/c No. replaces digits after 15 digit with 0.
e.g
Payee A/c No. IFSC Bank PAN No. Amount
ABCD 98765432198765432198 XXXX XXXX XXXXXX XXXXXX
After Exporting
Payee A/c No. IFSC Bank PAN No. Amount
ABCD 98765432198765400000 XXXX XXXX XXXXXX XXXXXX
Here 98765432198765432198 replaced with 98765432198765400000.
Because of this problem I have to change miss matched account no. manually by checking each and every a/c no.
How to resolve this problem?
here is my code to export
Response.Clear()
Response.Buffer = True
Response.ClearContent()
Response.ClearHeaders()
Response.Charset = ""
Dim strwritter As New StringWriter()
Dim htmltextwrtter As New HtmlTextWriter(strwritter)
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.ms-excel"
Dim FileName As String = "Payout Till" & a.ConvetDateToDDMMYY(Tdate) & ".xls"
Response.AddHeader("Content-Disposition", Convert.ToString("attachment;filename=") & FileName)
GridView1.GridLines = GridLines.Both
GridView1.HeaderStyle.Font.Bold = True
GridView1.RenderControl(htmltextwrtter)
Response.Write(strwritter.ToString())
Response.End()