问题描述
在C#中怎样实现DTS数据导入导出?最好是在程序里面动态定义DTS包,能给个详细代码最好
解决方案
解决方案二:
定
解决方案三:
要这个dllInterop.Access.dll然后usingAccess;//直接调用access的导出功能Access.ApplicationClassoAccess=newAccess.ApplicationClass();oAccess.Visible=false;//ACCESS9:oAccess.OpenCurrentDatabase("d:\测试.mdb",false,"");//导入accessoAccess.DoCmd.TransferSpreadsheet(Access.AcDataTransferType.acExport,Access.AcSpreadSheetType.acSpreadsheetTypeExcel9,"测试","d:\测试.xls",true,null,null);oAccess.CloseCurrentDatabase();oAccess.DoCmd.Quit(Access.AcQuitOption.acQuitSaveNone);System.Runtime.InteropServices.Marshal.ReleaseComObject(oAccess);oAccess=null;MessageBox.Show("导入成功");
时间: 2024-10-10 11:06:08