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

ASP.NET

 
GeneralRe: Datatble Concept Pin
GomathiR17-Feb-09 0:08
GomathiR17-Feb-09 0:08 
GeneralRe: Datatble Concept Pin
anujbanka178417-Feb-09 0:19
anujbanka178417-Feb-09 0:19 
QuestionWindow size? Pin
Karthick_gc16-Feb-09 23:51
Karthick_gc16-Feb-09 23:51 
AnswerRe: Window size? Pin
mr_muskurahat17-Feb-09 0:53
mr_muskurahat17-Feb-09 0:53 
GeneralRe: Window size? Pin
Karthick_gc17-Feb-09 1:00
Karthick_gc17-Feb-09 1:00 
GeneralRe: Window size? Pin
Anshumas17-Feb-09 17:01
Anshumas17-Feb-09 17:01 
Questionchange culture problem Pin
VijayVishwakarma16-Feb-09 23:49
VijayVishwakarma16-Feb-09 23:49 
QuestionExporting griedview data to an excel spreadsheet [modified] Pin
AllPhee16-Feb-09 23:12
AllPhee16-Feb-09 23:12 
hi Everyone,

I am creating an application that gets data from specific griedview columns and export the data to an excel spreadsheet 9that is located though a fileupload control.

After i execute the code I find that the spreadsheet was not populated. Please exemine my code below, your help will be appreciated. Thanks

Protected Sub Export_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Export.Click<br />
<br />
        Dim xConnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & _<br />
                    "Data Source=" & Server.MapPath("TemplateWDataNEW.xls") & ";" & _<br />
                    "Extended Properties=Excel 8.0;"<br />
<br />
<br />
        Dim objXConn As New OleDbConnection(xConnStr)<br />
        objXConn.Open()<br />
<br />
        For Each gvRow As GridViewRow In gvClients.Rows<br />
            <br />
            Dim strRoom1 As String = "INSERT INTO [Sheet2$](tvlr_Lastname, tvlr_Firstname,tvlr_title) values (@Surname,@FName,@Title)"<br />
            Dim InsertCommand As New OleDbCommand(strRoom1, objXConn)<br />
<br />
            InsertCommand.Parameters.AddWithValue("@Surname", gvRow.Cells(0).Text)<br />
            InsertCommand.Parameters.AddWithValue("@FName", gvRow.Cells(1).Text)<br />
            InsertCommand.Parameters.AddWithValue("@Title", gvRow.Cells(2).Text)<br />
            InsertCommand.ExecuteNonQuery()<br />
        Next<br />
        objXConn.Close()<br />
<br />
    End Sub


allphpro

modified on Tuesday, February 17, 2009 5:22 AM

Questionchange the "select"text Pin
TerRO_GirL16-Feb-09 23:09
TerRO_GirL16-Feb-09 23:09 
AnswerRe: change the "select"text Pin
Calin Tatar17-Feb-09 3:30
Calin Tatar17-Feb-09 3:30 
QuestionLimit data on Repeater? Pin
Karthick_gc16-Feb-09 22:45
Karthick_gc16-Feb-09 22:45 
AnswerRe: Limit data on Repeater? Pin
Abhishek Sur16-Feb-09 22:53
professionalAbhishek Sur16-Feb-09 22:53 
GeneralRe: Limit data on Repeater? Pin
Karthick_gc16-Feb-09 23:26
Karthick_gc16-Feb-09 23:26 
QuestionAjax hover menu on gridview with make a add link Pin
kamakshim16-Feb-09 22:44
kamakshim16-Feb-09 22:44 
Questionerror while trying to get user id from membership Pin
Mansour Shaaban16-Feb-09 22:21
Mansour Shaaban16-Feb-09 22:21 
QuestionError: Invalid length for a Base-64 char array Pin
amargujrathi200616-Feb-09 21:56
amargujrathi200616-Feb-09 21:56 
Answergridview sorting in inside the update panel Pin
Member 387988116-Feb-09 21:35
Member 387988116-Feb-09 21:35 
GeneralRe: gridview sorting in inside the update panel Pin
rakeshs31216-Feb-09 22:43
rakeshs31216-Feb-09 22:43 
QuestionTable? Pin
Karthick_gc16-Feb-09 20:17
Karthick_gc16-Feb-09 20:17 
GeneralRe: Table? Pin
Vimal Raj16-Feb-09 22:08
Vimal Raj16-Feb-09 22:08 
GeneralRe: Table? Pin
Karthick_gc16-Feb-09 22:17
Karthick_gc16-Feb-09 22:17 
GeneralRe: Table? Pin
Subin Alex16-Feb-09 23:17
Subin Alex16-Feb-09 23:17 
AnswerRe: Table? Pin
Vimal Raj17-Feb-09 18:45
Vimal Raj17-Feb-09 18:45 
QuestionVideo? Pin
Karthick_gc16-Feb-09 20:12
Karthick_gc16-Feb-09 20:12 
AnswerRe: Video? Pin
N a v a n e e t h16-Feb-09 21:07
N a v a n e e t h16-Feb-09 21:07 

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.