|
|
怎样将datagrid中数据到处到execl中 |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
1 引入Microsoft Excel 10.0 Object Library (项目->添加引用->Com) 2 Dim excelapp As New excel.Application Dim excelbook As excel.Workbook Dim excelsheet As excel.Worksheet 3 Set excelbook = excelapp.Workbooks.Open (App.path & "\工程进度表.xls") excelapp.Sheets("sheet1").Select Set excelsheet = excelapp.Sheets("Sheet1") 4 excelsheet.Cells(2, 1) = .... 5 excelbook.Save excelapp.Visible = True 6 excelsheet.Columns(i).ColumnWidth = 5.38 excelsheet.Rows(i).RowHeight = 51 7 Set excelapp = Nothing Set excelbook = Nothing Set excelsheet = Nothing
|
|
相关文章:相关软件: |
|