OleDb connection to Excel; how do I select fixed width, unbounded height?

前端 未结 5 699
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-13 09:14

I\'m using OleDb to select data from excel spreadsheets. Each spreadsheet can contain many small tables, and possibly furniture like titles and labels. So it might look like

5条回答
  •  死守一世寂寞
    2021-01-13 10:05

    We read the entire spreadsheet (ie: SELECT * FROM [Sheet1$]) and handle everything else in our application code. It's easy enough to race through the resultant OleDbDataReader to get to the starting point of your data and start processing.

    It may not be the absolutely fastest way to suck data from Excel, but it is reliable.

提交回复
热议问题