01.
Excel.Application xlApp;
02.
Excel.Workbook xlWorkBook;
03.
Excel.Worksheet xlWorkSheet;
04.
object
mis = Type.Missing;
05.
06.
string
strFileName =
"C:\\ExcelC\\Xls\\GenExcel.xls"
;
07.
08.
xlApp =
new
Excel.ApplicationClass();
09.
xlWorkBook = xlApp.Workbooks.Add(mis);
10.
11.
12.
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
13.
xlWorkSheet.Name =
"My Sheet"
;
14.
xlWorkSheet.Cells[1, 1] =
"www.ThaiCreate.Com"
;
15.
xlWorkSheet.Cells[2, 1] =
"Mr.Weerachai Nukitram"
;