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 filling dataSet

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? Is there any
other way to get data from .xls file without opening the Excel itself?
 
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
assign dataset to matching dataset Michael Dirksen Excel Programming 0 June 16th 06 04:34 PM
Converting A Quarterly Dataset to Weekly Dataset Dan Thompson Excel Programming 5 November 25th 05 09:27 PM
filling information from one cell and filling another. Dianne Excel Worksheet Functions 1 August 15th 05 08:14 PM
creating a new dataset brian kaufmann Excel Programming 0 August 16th 04 08:47 PM
two dataset comparison Scoomie Excel Programming 1 June 19th 04 07:47 PM


All times are GMT +1. The time now is 02:40 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"