LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Geting data from Excel .xls file

Hello,

I am trying to get data from an Excel file using OleDbConnection in C#.NET
I have a function that returns a DataSet filled with data from the .xls
file. Problem is, it works only if I have opened that file in Excel manualy
before I run my function.
If the file isn't opened, when trying "oleDbDataAdapter.Fill ( dataSet )"
I'm receiving OleDbException: "External table is not in the expected format."

I have tried to open the file using Excel 11.0 reference before running that
function, but it didn't change anything. Seems like it's working only if the
file is opened not in Read-Only mode, but the program is supposed to be
working on several machines, possibly at the same time - cannot avoid
situation, that the file is used by someone else.

I know it is a common problem, and I also know there is no answer for that
question so far. Does anyone managed to resolve such issue?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
geting a if/and number off of two list cells nbach Excel Worksheet Functions 2 December 12th 08 08:05 PM
geting data from internet alvin Kuiper Excel Programming 6 February 19th 06 12:09 PM
geting the smaller number in a line?? Felipe Excel Discussion (Misc queries) 2 December 28th 05 03:17 PM
geting hiperlink wiyh vlookup Horacio Excel Worksheet Functions 0 February 24th 05 11:36 PM
Erroe on Geting External Data MESTRELLA29[_2_] Excel Programming 0 February 10th 05 07:13 PM


All times are GMT +1. The time now is 07:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"