Hi guys, my first time here, and my first time with C# also. Please some help. I want to create a new excel workbook, and writte "hello" in cell (row 2, col 5) of Sheet2. ... I can't even create the excel...! I am trying this way...
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Office = Microsoft.Office.Core; using VBIDE = Microsoft.Vbe.Interop; using Excel = Microsoft.Office.Interop.Excel;
namespace PlayingWithExcelProj { public partial class frmPlayWithExcel : Form { private void btnOpenNewWk_Click(object sender, EventArgs e) { Excel.Application excelApp = new Excel.ApplicationClass(); excelApp.Visible = true; Excel.Workbook newWorkbook = excelApp.Workbooks.Add(Excel);