Click here to Skip to main content
16,007,760 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralTreeview Icons distorted Pin
Mbire13-Jan-08 23:13
Mbire13-Jan-08 23:13 
GeneralRe: Treeview Icons distorted Pin
Dave Kreskowiak16-Jan-08 2:20
mveDave Kreskowiak16-Jan-08 2:20 
GeneralRe: Treeview Icons distorted Pin
Mbire16-Jan-08 2:51
Mbire16-Jan-08 2:51 
GeneralRe: Treeview Icons distorted Pin
Dave Kreskowiak16-Jan-08 3:43
mveDave Kreskowiak16-Jan-08 3:43 
GeneralRe: Treeview Icons distorted Pin
Mbire16-Jan-08 4:08
Mbire16-Jan-08 4:08 
GeneralRe: Treeview Icons distorted Pin
Dave Kreskowiak16-Jan-08 6:53
mveDave Kreskowiak16-Jan-08 6:53 
GeneralRe: Treeview Icons distorted Pin
Mbire16-Jan-08 20:14
Mbire16-Jan-08 20:14 
Generalexporting to excel Pin
sivaram praveen13-Jan-08 20:44
sivaram praveen13-Jan-08 20:44 
hi all,

in my application im having code to convert the datagrid values to excel sheet but when it is saving it is taking .html extension instead if .xls, pls help me to sort out.

Response.Clear()
Response.Buffer = True
Response.AddHeader("content-position", "attachment;filename=FileName.xls")
Response.Charset = ""
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/vnd.ms-Excel"
Me.EnableViewState = False

Dim stringwrite As New System.IO.StringWriter
Dim htmlwrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringwrite)

Dim da_GetAllBooks As SqlDataAdapter = New SqlDataAdapter("GetAllBooks_Proc", Con)
da_GetAllBooks.SelectCommand.CommandType = CommandType.StoredProcedure
da_GetAllBooks.Fill(_dataSet, "AllBooks(0)")

Dim index As Integer = 0
For index = 0 To dg_AllBooks.Columns.Count - 1
dg_AllBooks.Columns(index).SortExpression = True
Next
dg_AllBooks.DataSource = (_dataSet.Tables("AllBooks"))
dg_AllBooks.DataBind()

dg_AllBooks.RenderControl(htmlwrite)
Response.Write(stringwrite.ToString())
Response.End()

help me
GeneralRe: exporting to excel Pin
pmarfleet13-Jan-08 21:58
pmarfleet13-Jan-08 21:58 
Generalopening a excel application Pin
Prakash_Mishra13-Jan-08 20:38
Prakash_Mishra13-Jan-08 20:38 
GeneralRe: opening a excel application Pin
Steven J Jowett15-Jan-08 0:26
Steven J Jowett15-Jan-08 0:26 
QuestionDisplaying text (title) on row headers in a dataGridView? Pin
Benny_Lava13-Jan-08 19:18
Benny_Lava13-Jan-08 19:18 
AnswerRe: Displaying text (title) on row headers in a dataGridView? Pin
Dave Kreskowiak14-Jan-08 5:13
mveDave Kreskowiak14-Jan-08 5:13 
GeneralRecognizing New Database Tables in the Data Set Pin
AAGTHosting13-Jan-08 18:24
AAGTHosting13-Jan-08 18:24 
GeneralRe: Recognizing New Database Tables in the Data Set Pin
pmarfleet13-Jan-08 21:52
pmarfleet13-Jan-08 21:52 
GeneralRe: Recognizing New Database Tables in the Data Set Pin
AAGTHosting14-Jan-08 7:09
AAGTHosting14-Jan-08 7:09 
GeneralRe: Recognizing New Database Tables in the Data Set Pin
Dave Kreskowiak14-Jan-08 7:36
mveDave Kreskowiak14-Jan-08 7:36 
GeneralRe: Recognizing New Database Tables in the Data Set Pin
AAGTHosting14-Jan-08 7:49
AAGTHosting14-Jan-08 7:49 
GeneralRe: Recognizing New Database Tables in the Data Set Pin
Dave Kreskowiak14-Jan-08 8:19
mveDave Kreskowiak14-Jan-08 8:19 
GeneralSimple printing help Pin
xbiplav13-Jan-08 14:28
xbiplav13-Jan-08 14:28 
GeneralRe: Simple printing help Pin
Ajay.k_Singh13-Jan-08 22:26
Ajay.k_Singh13-Jan-08 22:26 
GeneralRe: Simple printing help Pin
Duncan Edwards Jones14-Jan-08 5:36
professionalDuncan Edwards Jones14-Jan-08 5:36 
GeneralSerialization and Linked Objects Pin
MikeMarq13-Jan-08 11:01
MikeMarq13-Jan-08 11:01 
GeneralRe: Serialization and Linked Objects Pin
Dave Kreskowiak14-Jan-08 5:03
mveDave Kreskowiak14-Jan-08 5:03 
QuestionListBox Pin
dexter970313-Jan-08 9:04
dexter970313-Jan-08 9:04 

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.