Click here to Skip to main content
15,916,180 members
Home / Discussions / C#
   

C#

 
AnswerRe: what does this error mean? Pin
Brisingr Aerowing20-Oct-12 19:16
professionalBrisingr Aerowing20-Oct-12 19:16 
Questionhow I can make the intranet developed in c # to connect to several database in SQL Server 2008 R2 Pin
jaime durand20-Oct-12 18:28
professionaljaime durand20-Oct-12 18:28 
AnswerRe: how I can make the intranet developed in c # to connect to several database in SQL Server 2008 R2 Pin
uspatel20-Oct-12 19:03
professionaluspatel20-Oct-12 19:03 
AnswerRe: how I can make the intranet developed in c # to connect to several database in SQL Server 2008 R2 Pin
Mycroft Holmes21-Oct-12 16:16
professionalMycroft Holmes21-Oct-12 16:16 
Questionerror "object reference not set to an instance of an object" c# Pin
madimboo20-Oct-12 12:30
madimboo20-Oct-12 12:30 
AnswerRe: error "object reference not set to an instance of an object" c# Pin
Richard Andrew x6420-Oct-12 13:48
professionalRichard Andrew x6420-Oct-12 13:48 
AnswerRe: error "object reference not set to an instance of an object" c# Pin
Dave Kreskowiak20-Oct-12 20:48
mveDave Kreskowiak20-Oct-12 20:48 
AnswerRe: error "object reference not set to an instance of an object" c# Pin
Eddy Vluggen21-Oct-12 0:32
professionalEddy Vluggen21-Oct-12 0:32 
AnswerRe: error "object reference not set to an instance of an object" c# Pin
Abhinav S21-Oct-12 17:47
Abhinav S21-Oct-12 17:47 
QuestionChatting application in C# Pin
speedchandu20-Oct-12 11:27
speedchandu20-Oct-12 11:27 
AnswerRe: Chatting application in C# Pin
Richard Andrew x6420-Oct-12 13:49
professionalRichard Andrew x6420-Oct-12 13:49 
GeneralRe: Chatting application in C# Pin
speedchandu20-Oct-12 18:55
speedchandu20-Oct-12 18:55 
AnswerRe: Chatting application in C# Pin
uspatel20-Oct-12 19:10
professionaluspatel20-Oct-12 19:10 
GeneralRe: Chatting application in C# Pin
speedchandu22-Oct-12 21:57
speedchandu22-Oct-12 21:57 
QuestionRe: Chatting application in C# Pin
Eddy Vluggen21-Oct-12 0:32
professionalEddy Vluggen21-Oct-12 0:32 
QuestionDataTable not Visible Outside of using Block Pin
ASPnoob20-Oct-12 4:52
ASPnoob20-Oct-12 4:52 
AnswerRe: DataTable not Visible Outside of using Block Pin
Pete O'Hanlon20-Oct-12 5:13
mvePete O'Hanlon20-Oct-12 5:13 
AnswerRe: DataTable not Visible Outside of using Block Pin
Dave Kreskowiak20-Oct-12 6:44
mveDave Kreskowiak20-Oct-12 6:44 
QuestionAdding Elements of a List to Another List Pin
ASPnoob20-Oct-12 2:40
ASPnoob20-Oct-12 2:40 
AnswerRe: Adding Elements of a List to Another List Pin
Richard MacCutchan20-Oct-12 3:01
mveRichard MacCutchan20-Oct-12 3:01 
GeneralRe: Adding Elements of a List to Another List Pin
ASPnoob20-Oct-12 3:58
ASPnoob20-Oct-12 3:58 
GeneralRe: Adding Elements of a List to Another List Pin
Richard MacCutchan20-Oct-12 4:05
mveRichard MacCutchan20-Oct-12 4:05 
QuestionDisable Print in webbrowser Pin
zaherAmad20-Oct-12 2:37
zaherAmad20-Oct-12 2:37 
AnswerRe: Disable Print in webbrowser Pin
Dave Kreskowiak20-Oct-12 3:55
mveDave Kreskowiak20-Oct-12 3:55 
QuestionWrite data into excel sheets using c# Pin
Arun kumar Gautam19-Oct-12 23:39
Arun kumar Gautam19-Oct-12 23:39 
I make the windows form on which on a single button click performs like this
C#
private void button1_Click(object sender, EventArgs e)
        {
Excel.Application exapp=null;
            Excel.Workbook exbook=null;
            Excel.Worksheet exsheet = null;
            object misvalue = System.Reflection.Missing.Value;
            exapp = new Excel.Application();
            exapp.SheetsInNewWorkbook = 1;
            exbook = exapp.Workbooks.Add(misvalue);
            exsheet = (Excel.Worksheet)exbook.Worksheets.get_Item(1);
            exsheet.Cells[1, 1] = "First Name";
            exsheet.Cells[1, 2] = "Last Name";
            exsheet.Cells[1, 3] = "Address1";
            exsheet.Cells[1, 4] = "Address2";
            exsheet.Cells[1, 5] = "City";
            exsheet.Cells[1, 6] = "PinCode";
            exsheet.Cells[1, 7] = "Phone Number";
            exsheet.Cells[2, 1] = textBox1.Text.ToString();
            exsheet.Cells[2, 2] = textBox2.Text.ToString();
            exsheet.Cells[2, 3] = textBox3.Text.ToString();
            exsheet.Cells[2, 4] = textBox4.Text.ToString();
            exsheet.Cells[2, 5] = textBox5.Text.ToString();
            exsheet.Cells[2, 6] = textBox6.Text.ToString();
            exsheet.Cells[2, 7] = textBox7.Text.ToString();
            exbook.SaveAs("rep.xls", Excel.XlFileFormat.xlWorkbookNormal, misvalue, misvalue, misvalue, misvalue, Excel.XlSaveAsAccessMode.xlExclusive, misvalue, misvalue, misvalue, misvalue, misvalue);
            exapp.Quit();
            releaseObject(exapp);
            releaseObject(exbook);
            releaseObject(exsheet);
            }


but this thing imports data from windows in only one sheet
but i want to make a new sheet one each button click in excel
can anybody help me in it??????

Thanks in advance

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.