|
|
|
.NET การสร้าง C# กับ Excel.Application บน Windows 7 และ Microsoft Office Excel 2007 |
|
|
|
|
|
|
|
Code (C#)
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
object mis = Type.Missing;
string strFileName = "C:\\ExcelC\\Xls\\GenExcel.xls";
xlApp = new Excel.ApplicationClass();
xlWorkBook = xlApp.Workbooks.Add(mis);
//xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.Add(mis, mis, mis, mis); /*** for Add New Sheet ***/
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
xlWorkSheet.Name = "My Sheet";
xlWorkSheet.Cells[1, 1] = "www.ThaiCreate.Com";
xlWorkSheet.Cells[2, 1] = "Mr.Weerachai Nukitram";
Go to : C# .NET Generate Excel (Excel 2003 , Excel 2007)
Go to : C# Open Excel and Create Font,Border,Color,Style
|
|
|
|
|
Date :
2011-09-08 20:28:13 |
By :
thaicreate |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|