pen('C:\My Documents\Ca09lin1.xls'); //打开已存在工作簿
ExcelApp.Worksheets[2].activate; //打开第2个工作表
//ExcelApp.WorkSheets['第四章'].activate; //打开名为第四章的工作表
ExcelApp.Cells[1,4].Value:='第一行第四列';
ExcelApp.Cells[1,5].Value:='第一行第五列';
ExcelApp.ActiveSheet.Columns[4].ColumnWidth:=15;
ExcelApp.ActiveSheet.Rows[1].RowHeight:=15;
//ExcelApp.WorkSheets[1].Rows[8].PageBreak:=1; //设置分页符,但似无效
//Excelapp.ActiveSheet.Rows[8].PageBreak:=1; //同上
ExcelApp.ActiveSheet.Range['B3:D4'].Borders[2].Weight:=3;
ExcelApp.ActiveSheet.Range['B3:D4'].Borders[1].Weight:=3;
ExcelApp.ActiveSheet.Range['B3:D4'].Borders[3].Weight:=3;
ExcelApp.ActiveSheet.Range['B3:D4'].Borders[4].Weight:=3;
//ExcelApp.ActiveSheet.Range['B3:D4'].Borders[5].Weight:=3; //会直接在范围内的各Cell内加上斜杠|
//ExcelApp.ActiveSheet.Range['B3:D4'].Borders[6].Weight:=3; //与上句类似
//Bordrs:1-左 2-右 3-顶 4-底 5-斜( \ ) 6-斜( / )
ExcelApp.Cells[3,2].Value:='三行二列';
ExcelApp.Cells[3,3].Value:='三行三列';
ExcelApp.Cells[3,4