Click here to Skip to main content
15,898,222 members
Home / Discussions / C#
   

C#

 
QuestionHandling Text in Text Box Pin
haseeb_saeed13-Mar-06 8:45
haseeb_saeed13-Mar-06 8:45 
AnswerRe: Handling Text in Text Box Pin
Dave Kreskowiak13-Mar-06 10:39
mveDave Kreskowiak13-Mar-06 10:39 
AnswerRe: Handling Text in Text Box Pin
Drew McGhie13-Mar-06 11:42
Drew McGhie13-Mar-06 11:42 
Questiongetting GPS coordinates on pocketpc Pin
BlackDice13-Mar-06 8:15
BlackDice13-Mar-06 8:15 
AnswerRe: getting GPS coordinates on pocketpc Pin
Dave Kreskowiak13-Mar-06 10:36
mveDave Kreskowiak13-Mar-06 10:36 
NewsRe: getting GPS coordinates on pocketpc Pin
BlackDice15-Mar-06 5:22
BlackDice15-Mar-06 5:22 
GeneralRe: getting GPS coordinates on pocketpc Pin
Dave Kreskowiak15-Mar-06 11:26
mveDave Kreskowiak15-Mar-06 11:26 
QuestionMicrosoft.Jet.OLEDB Extended Properties Pin
mcljava13-Mar-06 8:10
mcljava13-Mar-06 8:10 
I recently started a C# prototype using the OLE DB access method to read from a hefty Excel spreadsheet that we use at the office. The nice thing about OLE DB is you can read Excel worksheets pretty easily, and in block read style.

H O W E V E R, when was the last time you saw a clean error free, perfectly formatted spreadsheet?
That's where I am stuck. It seems the OLE DB driver/JET engine will happily retrieve the specified query range but it also supplies a null for any cell it doesn't like. Is there a way to override this behavior and tell Jet.OLEDB through the ExtendedProperties to retrive all data as is?

Currently I have specfied Imex=2 but that does not seem to be getting it done.

FYI, here is one way to read a worksheet in one read. In my case I know there are roughly 330-370 rows per worksheet:

<br />
// open the JET connection<br />
OleDbConnection con = new OleDbConnection( connectionOpts );<br />
con.Open();<br />
<br />
// build the query<br />
string query = string.Format( "SELECT * FROM [{0}$[1]]", tableName, queryRange );<br />
<br />
// fill the dataset<br />
OleDbDataAdapter oleAdapter = new OleDbDataAdapter();<br />
oleAdapter.SelectCommand = new OleDbCommand( query, con );<br />
DataSet ds = new DataSet();<br />
int rowsProcessed = oleAdapter.Fill( ds, "data" );<br />
<br />
// free up resources<br />
oleAdapter.Dispose();<br />
oleAdapter.Close();<br />
etc.<br />


Since this is such a simple way to read the data, now all I need is a way to ensure it gets ALL of the data.

Mike Luster
CTI/IVR/Telephony SME
AnswerRe: Microsoft.Jet.OLEDB Extended Properties Pin
mcljava15-Mar-06 7:54
mcljava15-Mar-06 7:54 
QuestionHow to find Serializable attribute with reflection? Pin
vineas13-Mar-06 7:18
vineas13-Mar-06 7:18 
AnswerRe: How to find Serializable attribute with reflection? Pin
leppie13-Mar-06 7:58
leppie13-Mar-06 7:58 
GeneralRe: How to find Serializable attribute with reflection? Pin
vineas13-Mar-06 8:23
vineas13-Mar-06 8:23 
GeneralRe: How to find Serializable attribute with reflection? Pin
superpzgpzg8-Dec-09 21:11
superpzgpzg8-Dec-09 21:11 
QuestionHow to import URLs from Google page to listview Pin
Rajendra Rana13-Mar-06 6:35
Rajendra Rana13-Mar-06 6:35 
AnswerRe: How to import URLs from Google page to listview Pin
Somanova42013-Mar-06 9:59
Somanova42013-Mar-06 9:59 
Questionuser control Pin
ap_sa13-Mar-06 6:05
ap_sa13-Mar-06 6:05 
QuestionHow can I make a DataGrid scroll up&down (or left&right) programmactically C#??? Pin
coloso13-Mar-06 4:16
coloso13-Mar-06 4:16 
Questionposition of cursor in Text Box? Pin
superdragon13-Mar-06 4:08
superdragon13-Mar-06 4:08 
AnswerRe: position of cursor in Text Box? Pin
Roy Heil13-Mar-06 4:56
professionalRoy Heil13-Mar-06 4:56 
GeneralRe: position of cursor in Text Box? Pin
superdragon13-Mar-06 11:55
superdragon13-Mar-06 11:55 
QuestionGridView link with two data???? Pin
papa198013-Mar-06 3:29
papa198013-Mar-06 3:29 
QuestionCreate a very big PictureBox Pin
Sasuko13-Mar-06 2:31
Sasuko13-Mar-06 2:31 
QuestionFolderBrowserDialog Problem in C# Pin
AyBee13-Mar-06 2:24
AyBee13-Mar-06 2:24 
AnswerRe: FolderBrowserDialog Problem in C# Pin
J4amieC13-Mar-06 4:05
J4amieC13-Mar-06 4:05 
AnswerRe: FolderBrowserDialog Problem in C# Pin
vineas13-Mar-06 4:18
vineas13-Mar-06 4:18 

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.