/// /// 将DataSet里所有数据导入Excel. /// 需要添加COM: Microsoft Excel Object Library. /// using Excel; /// /// /// public static void ExportToExcel(string filePath, DataSet ds) { object oMissing = System.Reflection.Missing.Value; Excel.ApplicationClass xlApp = new Excel.ApplicationClass(); try { // 打开Excel文件。以下为Office 2000. Excel.Workbook xlWorkbook = xlApp....
[ 查看全文 ]