Click here to Skip to main content
15,896,207 members
Home / Discussions / C#
   

C#

 
AnswerRe: Inherit Process Pin
Luc Pattyn16-Feb-09 13:55
sitebuilderLuc Pattyn16-Feb-09 13:55 
GeneralRe: Inherit Process [modified] Pin
Xmen Real 16-Feb-09 18:55
professional Xmen Real 16-Feb-09 18:55 
AnswerRe: Inherit Process Pin
Luc Pattyn16-Feb-09 19:08
sitebuilderLuc Pattyn16-Feb-09 19:08 
GeneralRe: Inherit Process Pin
Xmen Real 16-Feb-09 19:10
professional Xmen Real 16-Feb-09 19:10 
AnswerInvalidCastException Pin
Luc Pattyn17-Feb-09 2:57
sitebuilderLuc Pattyn17-Feb-09 2:57 
GeneralRe: InvalidCastException Pin
Xmen Real 17-Feb-09 3:03
professional Xmen Real 17-Feb-09 3:03 
QuestionA problem with wmp.dll Pin
Sokka9316-Feb-09 5:47
Sokka9316-Feb-09 5:47 
QuestionC# read of xls file works on Vista home premium but not XP Pro, Vista Business or 2003 server. [modified] Pin
mid_life_crisis16-Feb-09 5:38
mid_life_crisis16-Feb-09 5:38 
These are the relevent lines from the code. The same file is being opened, the problem is that the program can't find the sheet when running under XPPRo, 2003 server, or Vista Business. All computers are up to date with the latest .net installed, all have Excel 2003 with current updates. Any ideas?


string listname = "Sheet1";
OleDbConnection con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";Extended Properties=Excel 8.0");
con.Open();
try
{
DataSet myDataSet = new DataSet();
OleDbDataAdapter myCommand = new OleDbDataAdapter(" SELECT * FROM [" + listname + "$]", con);
myCommand.Fill(myDataSet);



All Systems have Excel 2003 SP3
I get an error message on the failures:
System.Data.OleDbException: The Microsoft Jet database engine could not find the object 'Sheet1$'

modified on Tuesday, February 17, 2009 12:14 PM

AnswerRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
MickCurley16-Feb-09 8:04
MickCurley16-Feb-09 8:04 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
mid_life_crisis16-Feb-09 10:37
mid_life_crisis16-Feb-09 10:37 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
mid_life_crisis16-Feb-09 10:48
mid_life_crisis16-Feb-09 10:48 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
MickCurley16-Feb-09 12:48
MickCurley16-Feb-09 12:48 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
mid_life_crisis16-Feb-09 16:14
mid_life_crisis16-Feb-09 16:14 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
MickCurley16-Feb-09 21:16
MickCurley16-Feb-09 21:16 
GeneralRe: C# read of xls file works on Vista home preium but not XP Pro, Vista Business or 2003 server. Pin
mid_life_crisis17-Feb-09 2:26
mid_life_crisis17-Feb-09 2:26 
QuestionListBox Control - using DisplayMember and ValueMember Pin
divinyl16-Feb-09 5:34
divinyl16-Feb-09 5:34 
AnswerRe: ListBox Control - using DisplayMember and ValueMember Pin
Xmen Real 16-Feb-09 7:45
professional Xmen Real 16-Feb-09 7:45 
QuestionDrag&Drop over RichTextBox showing wrong DropEffect Pin
mav.northwind16-Feb-09 5:18
mav.northwind16-Feb-09 5:18 
AnswerRe: Drag&Drop over RichTextBox showing wrong DropEffect Pin
Xmen Real 16-Feb-09 7:54
professional Xmen Real 16-Feb-09 7:54 
GeneralRe: Drag&Drop over RichTextBox showing wrong DropEffect Pin
mav.northwind16-Feb-09 8:41
mav.northwind16-Feb-09 8:41 
GeneralRe: Drag&Drop over RichTextBox showing wrong DropEffect Pin
Xmen Real 16-Feb-09 13:44
professional Xmen Real 16-Feb-09 13:44 
QuestionSee the execution path of my program Pin
anderslundsgard16-Feb-09 5:17
anderslundsgard16-Feb-09 5:17 
AnswerRe: See the execution path of my program Pin
Eddy Vluggen16-Feb-09 7:36
professionalEddy Vluggen16-Feb-09 7:36 
QuestionShow Repeating Data Pin
Terick16-Feb-09 4:44
Terick16-Feb-09 4:44 
QuestionDesigning Menu/tool bar system takes action depending on control displayed Pin
SilimSayo16-Feb-09 4:38
SilimSayo16-Feb-09 4:38 

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.