using m***cel = microsoft.office.interop.excel;
using system.io;
//輸出用路徑
p_str_excelputout = system.environment.currentdirectory +
"\\測試用excel.xlsx"
;//如果已存在,則刪除
if(file.
exists((
string
)p_str_excelputout)
)//excel應用程式變數
m***cel.workbook exceldoc;
//excel文件變數
new();
//初始化
false
;false
;false
;//由於使用的是com庫,因此有許多變數需要用nothing代替
object nothing = missing.value;
add(nothing)
;//**變數
m***cel.worksheet ws =
(m***cel.worksheet)exceldoc.sheets[1]
;for
(int i =
0; i <
2; i++
)
結果
歡迎收藏,點讚;"一鍵三聯"走起,lol
刪除指定表的所有索引
刪除指定表的所有索引,包括主鍵索引,唯一索引和普通索引 呼叫 declare tbname varchar 20 set tbname a exec sp dropindex tbname vivianfdlpw 2005.9 引用情保留此資訊 if exists select 1 from sys...
刪除指定表的所有索引
刪除指定表的所有索引 刪除指定表的所有索引,包括主鍵索引,唯一索引和普通索引 呼叫 declare tbname varchar 20 set tbname a exec sp dropindex tbname vivianfdlpw 2005.9 引用情保留此資訊 if exists select...
刪除指定表的所有索引
刪除指定表的所有索引 刪除指定表的所有索引,包括主鍵索引,唯一索引和普通索引 呼叫 declare tbname varchar 20 set tbname a exec sp dropindex tbname vivianfdlpw 2005.9 引用情保留此資訊 if exists select...