C 中對資料庫檔案的匯入匯出Excel

2021-06-06 13:29:35 字數 509 閱讀 4671

excel匯入資料庫

using (stream stream = file.open(@"e:\10級net3班資訊表.xls", filemode.open, fileaccess.read))//建立流,指向要讀取的檔案

bstudent.add1(list);

messagebox.show("操作成功");

}將資料庫的表資訊匯入excel檔案

excelthreelayer.bll.t_classmessage b = new excelthreelayer.bll.t_classmessage();

int maxid = b.getmaxid();

using (filestream stream = new filestream(@"d:\2010級net班資訊表.xls", filemode.openorcreate, fileaccess.readwrite))//建立檔案寫入流

workbook.write(stream);//寫入檔案流

}

MYSQL 匯入匯出資料庫檔案

一 從資料庫匯出資料庫或表檔案 mysqldump u使用者名稱 p密碼 d 資料庫名 表名 指令碼名 匯出整個資料庫結構和資料 mysqldump h localhost uroot p123456 database e dump.sql 匯出單個資料表結構和資料 mysqldump h loca...

Oracle 資料庫檔案的匯入匯出

在進行oracle資料備份和還原時,經常轉換為dmp檔案或者sql檔案進行操作。下面介紹最常用的匯入匯出命令,內容由實踐操作,結合網際網路資料整理而來,如有異議,還望指正。一 sql檔案的匯入匯出 使用plsql進行匯入匯出,操作流程如下 1.資料匯出 exp system manager test...

資料庫中匯出 匯入 sql資料庫檔案

mysql 的bin 路徑需要在系統路徑中 如果沒在環境變數中新增bin路徑,則這裡要在cmd命令中直接進入bin根目錄下。1.將資料庫mydb 匯出到e mysql mydb.sql 檔案中 開啟開始 執行 輸入cmd 進入命令列模式 c mysql bin mysqldump h localho...