Dim dlg As new SaveFileDialog dlg.Filter = "Excel|*.xls;*.xlsx" If dlg.ShowDialog = DialogResult.OK Then CurrentTable.SaveExcel(dlg.FileName, CurrentTable.Name) Dim App As New MSExcel.Application Dim Wb As MSExcel.Workbook = App.WorkBooks.open(dlg.FileName) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) ws.name = "test" 'Dim Chart As WinForm.Chart = Forms("按科室统计").Controls("Chart1") 'chart.SaveImage("d:\test.wmf") ws.Shapes.AddPicture("d:\test.wmf", Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue,0, 0, 100, 80) app.visible = True End If
|