Click here to Skip to main content
15,892,537 members
Home / Discussions / C#
   

C#

 
AnswerYES... VERY HARD... Pin
_Comet_Keeper_29-Sep-05 9:54
_Comet_Keeper_29-Sep-05 9:54 
GeneralRe: YES... VERY HARD... Pin
Dave Kreskowiak29-Sep-05 10:12
mveDave Kreskowiak29-Sep-05 10:12 
QuestionReading from Excel (quick question) Pin
BECK729-Sep-05 6:20
BECK729-Sep-05 6:20 
AnswerRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 8:22
turbochimp29-Sep-05 8:22 
GeneralRe: Reading from Excel (quick question) Pin
BECK729-Sep-05 9:47
BECK729-Sep-05 9:47 
GeneralRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 10:58
turbochimp29-Sep-05 10:58 
GeneralRe: Reading from Excel (quick question) Pin
BECK729-Sep-05 11:20
BECK729-Sep-05 11:20 
GeneralRe: Reading from Excel (quick question) Pin
turbochimp29-Sep-05 12:12
turbochimp29-Sep-05 12:12 
Okay. First, put double-quotes around your Extended Properties value array. This requirement is not documented, but the lack of quotations around the Extended Properties will mess up the parsing of the connection string (nice, huh? Love those semicolons - the universal separator Smile | :) ) resulting in the exception you're seeing. See below for an example connection string that's confirmed working...

Now, if that doesn't do it:
I don't have a PC without Excel on it at the moment, but I did make a little sample application to read data from Excel spreadsheets. I used the connection string:

string connString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\"c:\\mydocument.xls\";Extended Properties=\"Excel 8.0;HDR=Yes;\"";


in my application. One difference is the addition of the HDR extended property. You could also alternately choose to use IMEX as an extended property, but I don't think they'd make a lot of difference, but might be worth a try:

"HDR=Yes;" indicates that the first row contains columnnames, not data

"IMEX=1;" tells the driver to always read "intermixed" data columns as text


Failing all other solutions to your exception problem, I would have to guess that your server has a damaged or missing Indexed Sequential Access Method (ISAM) driver for Excel.

There's an article here[^] that discusses how the Jet Db engine is used to access Excel workbooks.

Here[^] is a link dealing with how to repair missing/corrupted ISAM files.

I hope this helps - after this I've got nothing...


The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’

GeneralRe: Reading from Excel (quick question) Pin
BECK729-Sep-05 12:16
BECK729-Sep-05 12:16 
QuestionRowFilter property Pin
zaboboa29-Sep-05 5:52
zaboboa29-Sep-05 5:52 
AnswerRe: RowFilter property Pin
Wjousts29-Sep-05 6:15
Wjousts29-Sep-05 6:15 
GeneralRe: RowFilter property Pin
zaboboa29-Sep-05 9:03
zaboboa29-Sep-05 9:03 
GeneralRe: RowFilter property Pin
Wjousts29-Sep-05 9:17
Wjousts29-Sep-05 9:17 
GeneralRe: RowFilter property Pin
zaboboa29-Sep-05 9:32
zaboboa29-Sep-05 9:32 
QuestionBinary File Pin
Member 202517629-Sep-05 5:51
Member 202517629-Sep-05 5:51 
AnswerRe: Binary File Pin
leppie29-Sep-05 5:54
leppie29-Sep-05 5:54 
AnswerRe: Binary File Pin
Guffa29-Sep-05 7:01
Guffa29-Sep-05 7:01 
AnswerRe: Binary File Pin
29-Sep-05 11:01
suss29-Sep-05 11:01 
QuestionVector Graphics Pin
pmasknguyen29-Sep-05 5:48
pmasknguyen29-Sep-05 5:48 
AnswerRe: Vector Graphics Pin
leppie29-Sep-05 5:56
leppie29-Sep-05 5:56 
GeneralRe: Vector Graphics Pin
pmasknguyen29-Sep-05 13:48
pmasknguyen29-Sep-05 13:48 
Question(Xml) deserializing objects from dynamic assemblies. Pin
Rein_Petersen29-Sep-05 5:46
Rein_Petersen29-Sep-05 5:46 
AnswerRe: (Xml) deserializing objects from dynamic assemblies. Pin
leppie29-Sep-05 5:52
leppie29-Sep-05 5:52 
GeneralRe: (Xml) deserializing objects from dynamic assemblies. Pin
Rein_Petersen29-Sep-05 6:49
Rein_Petersen29-Sep-05 6:49 
GeneralRe: (Xml) deserializing objects from dynamic assemblies. Pin
Rein_Petersen29-Sep-05 7:54
Rein_Petersen29-Sep-05 7:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.