-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: cool_vjy
Message 1 in Discussion

    Please help! I am opening a new window that contains an Excel spreadsheet. The 
first column is a 13 digit identification number. This number can start with a zero. 
My problem is that when the data is displayed in the Excel window will display as 
89615670000 when it should display as 0089615670000. I can get the data to display 
correctly if I append a ' (upporstroph) before the number. However the ' displays in 
the data ('0089615670000) , here i want  the data to be without (') e.g 
(0089615670000). How can I fix this?  For this i am folowing these steps: 1- I am 
making a dataset from the dataset which contains string type data. 2- i have a class 
file contains function, which generates the excel file through my dataset. For 
generating the excel file i am using this function which has a datagrid.    
Public Shared Sub Convert(ByVal ds As System.Data.DataSet, ByVal TableIndex As 
Integer, ByVal response As System.Web.HttpResponse) 
If TableIndex > ds.Tables.Count - 1 Then 
Convert(ds, response) 
End If 
response.Clear() 
response.Charset = "" 
response.Charset = "Text" 
response.ContentType = "application/vnd.ms-Excel" 
Dim stringWrite As New System.IO.StringWriter() 
Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWrite) 
'instantiate a datagrid 
Dim dg As New System.Web.UI.WebControls.DataGrid() 
'set the datagrid datasource to the dataset passed in 
dg.ItemStyle.ToString() 
dg.DataSource = ds.Tables(TableIndex) 
'bind the datagrid 
dg.ItemStyle.CssClass = "myformattednumber" 
dg.DataBind() 
dg.ShowHeader = False 
'tell the datagrid to render itself to our htmltextwriter 
dg.RenderControl(htmlWrite) 
'all that's left is to output the html 
response.Write(stringWrite.ToString) 
response.End() 
End Sub Can any one tell me what do i do here to print the (0089615670000) as its is 
without using (')   Thanks vijay dubey

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to