日期:2014-05-17 浏览次数:20850 次
MSEXCEL.Application excelapp=new Microsoft.Office.Interop.Excel.Application(); object objOpt = System.Reflection.Missing.Value; MSEXCEL.Workbook exceelDoc = excelapp.Workbooks.Open(this.saveFileDialog1.FileName, objOpt, false, objOpt, objOpt, objOpt, true, objOpt, objOpt, true, objOpt, objOpt, objOpt, objOpt, objOpt); MSEXCEL.Worksheet ws = (MSEXCEL.Worksheet)exceelDoc.Sheets[1]; MSEXCEL.Range r; r = ws.get_Range("单元格横坐标", "单元格纵坐标"); r.Value2 = this.comboBox1.SelectedText; exceelDoc.Save();