Importing from Excel - non-numeric values are ignored

前端 未结 2 1225
误落风尘
误落风尘 2021-01-20 00:51

I have code that imports from Excel sheets of a specified format. In one of the columns, most data is numeric, but non-numeric values are also present. The non-numeric value

2条回答
  •  忘掉有多难
    2021-01-20 01:35

    By default Excel bases the data type for a column on the first 8 rows of data. To change this, you need to update the registry key:

    HKLM\Software\Microsoft\Office\12.0\Access Connect Engine\Engines\Excel

    with the number of rows you want Excel to scan. Set the value to 0 to have it scan all the rows. Note that setting it to zero can slow the Excel loads down a bit, especially on large spreadsheets.

    Also, if you are also using Excel 2003, you need to update a second registry key:

    HKLM\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel

提交回复
热议问题