Click here to Skip to main content
16,006,006 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: datagrid Pin
Laddie20-May-08 21:20
Laddie20-May-08 21:20 
QuestionSetting Hyperlink attributes dynamically. Pin
lune1220-May-08 21:11
lune1220-May-08 21:11 
AnswerRe: Setting Hyperlink attributes dynamically. Pin
Laddie20-May-08 21:15
Laddie20-May-08 21:15 
QuestionImplement FedEx in Application Pin
Imran Khan Pathan20-May-08 21:08
Imran Khan Pathan20-May-08 21:08 
AnswerRe: Implement FedEx in Application Pin
Christian Graus20-May-08 22:03
protectorChristian Graus20-May-08 22:03 
Questiondatabase connection Pin
saravanan0520-May-08 20:23
saravanan0520-May-08 20:23 
AnswerRe: database connection Pin
Christian Graus20-May-08 20:42
protectorChristian Graus20-May-08 20:42 
QuestionHow to export into Excel in asp.net 1.1 with proper formatting Pin
jmavn20-May-08 20:16
jmavn20-May-08 20:16 
Hi,

I have used the Response method for exporting to excel sheet. The Date field values are displayed not properly .

Snapshot of the code which I used:

Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader("Content-Disposition", "attachment; filename=""" & strFileName & """")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Me.EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)
Dim a As New System.Web.UI.HtmlTextWriterStyle
Excelgrid.RenderControl(oHtmlTextWriter)
Dim sExcel As String

sExcel &= oStringWriter.ToString()
Response.Write(sExcel)
Response.End()


My requirement is Date to be displayed in dd/MM/yyyy format.

But in exported excel sheet, some values are treated as Date and others (it assumes the first 'Date' part as month and if it is greater than 12, it treats as String instead of Date)

What way I can solve this problem. Any possibility to formatting the columns in excel thru coding and what else can I do to get the values properly.

Expecting ur swift reponse. I need solution for this as soon as possible coz I was dragging with the issue for past 3 days and not find any solution. Frown | :(

Thankfully,
jm

Questionopen a project Pin
ptvce20-May-08 19:57
ptvce20-May-08 19:57 
QuestionHow I can display text on Web page from XML file Pin
Qasim198420-May-08 19:18
professionalQasim198420-May-08 19:18 
AnswerRe: How I can display text on Web page from XML file Pin
Abhijit Jana20-May-08 19:22
professionalAbhijit Jana20-May-08 19:22 
AnswerRe: How I can display text on Web page from XML file Pin
Laddie20-May-08 19:35
Laddie20-May-08 19:35 
Question.net charting Pin
saravanan0520-May-08 18:51
saravanan0520-May-08 18:51 
AnswerRe: .net charting Pin
Pankaj Garg20-May-08 18:55
Pankaj Garg20-May-08 18:55 
Questionback button loading the page Pin
Pankaj Garg20-May-08 18:25
Pankaj Garg20-May-08 18:25 
QuestionRe: back button loading the page Pin
Vijayitsb20-May-08 19:12
Vijayitsb20-May-08 19:12 
AnswerRe: back button loading the page Pin
eyeseetee20-May-08 21:20
eyeseetee20-May-08 21:20 
QuestionHiding WSDL help page from a Web Service Pin
FyreWyrm20-May-08 16:42
FyreWyrm20-May-08 16:42 
AnswerRe: Hiding WSDL help page from a Web Service Pin
keyboard warrior20-May-08 16:48
keyboard warrior20-May-08 16:48 
GeneralRe: Hiding WSDL help page from a Web Service Pin
FyreWyrm20-May-08 16:53
FyreWyrm20-May-08 16:53 
AnswerRe: Hiding WSDL help page from a Web Service Pin
keyboard warrior20-May-08 17:01
keyboard warrior20-May-08 17:01 
GeneralRe: Hiding WSDL help page from a Web Service Pin
FyreWyrm20-May-08 17:03
FyreWyrm20-May-08 17:03 
GeneralRe: Hiding WSDL help page from a Web Service Pin
keyboard warrior20-May-08 17:16
keyboard warrior20-May-08 17:16 
GeneralRe: Hiding WSDL help page from a Web Service Pin
FyreWyrm20-May-08 17:22
FyreWyrm20-May-08 17:22 
GeneralRe: Hiding WSDL help page from a Web Service Pin
keyboard warrior20-May-08 17:58
keyboard warrior20-May-08 17:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.