Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Control Regions Pin
BobJanova31-Aug-11 7:43
BobJanova31-Aug-11 7:43 
GeneralRe: Custom Control Regions Pin
cjb1102-Sep-11 2:27
cjb1102-Sep-11 2:27 
Questionhow to associate file type in window registry for c# program ? Pin
Kim061830-Aug-11 23:29
Kim061830-Aug-11 23:29 
AnswerRe: how to associate file type in window registry for c# program ? Pin
BobJanova31-Aug-11 0:20
BobJanova31-Aug-11 0:20 
AnswerRe: how to associate file type in window registry for c# program ? Pin
Tony Pazzard31-Aug-11 3:28
Tony Pazzard31-Aug-11 3:28 
AnswerRe: how to associate file type in window registry for c# program ? Pin
PIEBALDconsult31-Aug-11 3:29
mvePIEBALDconsult31-Aug-11 3:29 
QuestionProblem while reading data from excel in c# Pin
nainakarri30-Aug-11 20:33
nainakarri30-Aug-11 20:33 
AnswerRe: Problem while reading data from excel in c# Pin
Wayne Gaylard30-Aug-11 21:29
professionalWayne Gaylard30-Aug-11 21:29 
There is a universal problem when accessing excel through ADO and that is that ADO only scans the first 8 lines and then chooses what data type to return based on the data type of the majority of the returned results. Thus if the majority of the returned results are strings, then it thinks that all the data should be returned as strings, and ignores other data types. The best way to get around this is to add the instruction IMEX=1 to the extended properties instruction in the connection string. Thus your connection string would now look like this:

C#
string connstr = @"provider = Microsoft.Jet.Oledb.4.0;Data Source='aaa.xls';Extended Properties='Excel 8.0;IMEX=1'";


Of course, the problem with this is that all your data is returned as a string, and numeric values will need to be parsed.

Hope this helps
Live for today. Plan for tomorrow. Party tonight!

GeneralRe: Problem while reading data from excel in c# Pin
Mycroft Holmes30-Aug-11 22:38
professionalMycroft Holmes30-Aug-11 22:38 
GeneralRe: Problem while reading data from excel in c# Pin
Wayne Gaylard30-Aug-11 22:56
professionalWayne Gaylard30-Aug-11 22:56 
GeneralRe: Problem while reading data from excel in c# Pin
nainakarri30-Aug-11 23:01
nainakarri30-Aug-11 23:01 
GeneralRe: Problem while reading data from excel in c# Pin
Wayne Gaylard30-Aug-11 23:06
professionalWayne Gaylard30-Aug-11 23:06 
QuestionGet object back from server with .net remoting and Socket connection Pin
MahieuBrecht30-Aug-11 20:03
MahieuBrecht30-Aug-11 20:03 
AnswerRe: Get object back from server with .net remoting and Socket connection Pin
Michael J. Eber8-Sep-11 8:10
Michael J. Eber8-Sep-11 8:10 
Questioncompare two active directory methods Pin
dcof30-Aug-11 11:50
dcof30-Aug-11 11:50 
Questionswitch statement Pin
dcof30-Aug-11 8:31
dcof30-Aug-11 8:31 
AnswerRe: switch statement Pin
PIEBALDconsult30-Aug-11 8:48
mvePIEBALDconsult30-Aug-11 8:48 
AnswerRe: switch statement PinPopular
OriginalGriff30-Aug-11 9:48
mveOriginalGriff30-Aug-11 9:48 
AnswerRe: switch statement Pin
Dylan Morley1-Sep-11 1:25
Dylan Morley1-Sep-11 1:25 
QuestionC# and USB IR camera Pin
sandy630-Aug-11 2:39
sandy630-Aug-11 2:39 
AnswerRe: C# and USB IR camera Pin
BobJanova30-Aug-11 4:48
BobJanova30-Aug-11 4:48 
SuggestionRe: C# and USB IR camera Pin
DaveAuld30-Aug-11 6:34
professionalDaveAuld30-Aug-11 6:34 
QuestionPer Pixel Access in C# winforms Pin
Thomas.D Williams30-Aug-11 2:17
Thomas.D Williams30-Aug-11 2:17 
AnswerRe: Per Pixel Access in C# winforms Pin
lukeer30-Aug-11 4:28
lukeer30-Aug-11 4:28 
GeneralRe: Per Pixel Access in C# winforms Pin
Thomas.D Williams30-Aug-11 5:26
Thomas.D Williams30-Aug-11 5:26 

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.