天天看點

将Excel導入DataGridView 中的"select * from [Sheet1$]"中[ ]裡面表單名的動态擷取

sheet1$是excel預設的第一個表名,如果改動:select * from

[sheet1$]"将查詢失敗,是以應根據選擇自動擷取excel表名: