¤ when i imported excel sheet to datagrid some of values are ignored.If i
Try specifying the IMEX argument:
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=e:\\My Documents\\Book2.xls;" +
"Extended Properties=" + (char)34 + "Excel 8.0;HDR=Yes;IMEX=1;" + (char)34;
Paul
~~~~
Microsoft MVP (Visual Basic)
private const string EXCEL_CONNECTION_STRING_1 =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";
private const string EXCEL_CONNECTION_STRING_2 = ";Extended
Properties=\"Excel 8.0;;HDR=No;MaxScanRows=0;IMEX=1\"";
Is there any other changes in this string
Regards,
Manoj
private const string EXCEL_CONNECTION_STRING_1 =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=";
private const string EXCEL_CONNECTION_STRING_2 = ";Extended
Properties=\"Excel 8.0;;HDR=No;MaxScanRows=0;IMEX=1\"";
Is there any modification or other property ,I have to add to work properly
Thanks
See the MS Knowledge base:
"http://support.microsoft.com/kb/189897/EN-US/"
There is a workaround (as noted above):
You have to change a registry key to the correct zero value, but note that you will see a performance hit as the full table will be scanned.
The Excel ODBC driver uses the TypeGuessRows DWORD value of one of the following registry key to determine how many rows to scan in your data:
* Excel 97
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\3.5\Engines\Excel
* Excel 2000 and later versions
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
Set the value to Zero.
Posted via DevelopmentNow.com Groups
http://www.developmentnow.com/g/