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

C#

 
AnswerRe: DataAdapter.Update method ?? Pin
J4amieC18-Apr-08 1:03
J4amieC18-Apr-08 1:03 
QuestionDo you know a good thumbnail component? Pin
Yianni18-Apr-08 0:21
Yianni18-Apr-08 0:21 
Generalhelp with variance and gradients of pixels Pin
diddy3417-Apr-08 23:29
diddy3417-Apr-08 23:29 
GeneralRe: help with variance and gradients of pixels Pin
Christian Graus18-Apr-08 0:33
protectorChristian Graus18-Apr-08 0:33 
QuestionRunning windows form remotely Pin
ONeil Tomlinson17-Apr-08 22:49
ONeil Tomlinson17-Apr-08 22:49 
GeneralRe: Running windows form remotely Pin
darkelv17-Apr-08 23:58
darkelv17-Apr-08 23:58 
GeneralRe: Running windows form remotely Pin
ONeil Tomlinson18-Apr-08 2:13
ONeil Tomlinson18-Apr-08 2:13 
GeneralOledbDataAdapter.fill gives a blank line when used to import some excel files Pin
Rey999917-Apr-08 22:32
Rey999917-Apr-08 22:32 
Hello everyone.

I have a little application which accepts an excel file, performs a formal check on it (nothing special, it just tries to see if there's a number or a string where they should be) and then inserts the records in a database.

This application loads the excel file, puts all the data in a datatable, then performs the formal check.
To do so, I use an instance of OleDbDataAdapter and call the Fill(table) method to fill up a table.

What is startling me the most is that with some Excel files, if I erase the last row manually (e.g. in MSExcel, clicking in the cells and pressing DEL), the row is not completely erased, so the datatable resulting from the Fill() operation has one last row empty, which is causing the formal check to fail - thus preventing the file to be loaded, since it works in an all-or-nothing basis (one rows fail, the whole file is discarded).
The thing that is driving my crazy is that this happens only on SOME excel files! Even using the same Excel installation on the very same machine, some files will show this behaviour, some others won't.

Has anything similar ever happened to some of you? I cannot really get a grasp of this.
Thanks in advance

Rey9999

~~~ From Milano to The Hague, easy as it goes ~~~

GeneralRe: OledbDataAdapter.fill gives a blank line when used to import some excel files Pin
Rob Smiley18-Apr-08 10:24
Rob Smiley18-Apr-08 10:24 
GeneralRe: OledbDataAdapter.fill gives a blank line when used to import some excel files Pin
Rey999920-Apr-08 21:04
Rey999920-Apr-08 21:04 
GeneralInValidCastException Pin
Programm3r17-Apr-08 22:25
Programm3r17-Apr-08 22:25 
QuestionSubsitute for SortedList Pin
Programm3r17-Apr-08 22:43
Programm3r17-Apr-08 22:43 
AnswerRe: Subsitute for SortedList Pin
Programm3r17-Apr-08 22:50
Programm3r17-Apr-08 22:50 
AnswerRe: Subsitute for SortedList Pin
Simon P Stevens18-Apr-08 3:38
Simon P Stevens18-Apr-08 3:38 
GeneralDisplay Barcode Images in Crystal report 10 Pin
nhss17-Apr-08 22:12
nhss17-Apr-08 22:12 
QuestionHow to convert Template field into LinkButton Pin
gunaarun17-Apr-08 21:51
gunaarun17-Apr-08 21:51 
AnswerRe: How to convert Template field into LinkButton Pin
Christian Graus17-Apr-08 21:56
protectorChristian Graus17-Apr-08 21:56 
AnswerRe: How to convert Template field into LinkButton Pin
Member 401784318-Apr-08 3:22
Member 401784318-Apr-08 3:22 
Questionwhy wrong radioButton method is invoched= Pin
merh17-Apr-08 21:35
merh17-Apr-08 21:35 
GeneralRe: why wrong radioButton method is invoched= Pin
Christian Graus17-Apr-08 21:49
protectorChristian Graus17-Apr-08 21:49 
GeneralRe: why wrong radioButton method is invoched= Pin
merh17-Apr-08 22:55
merh17-Apr-08 22:55 
GeneralAutosize columns in a ListView Pin
anderslundsgard17-Apr-08 21:27
anderslundsgard17-Apr-08 21:27 
GeneralRe: Autosize columns in a ListView Pin
John_Adams17-Apr-08 22:44
John_Adams17-Apr-08 22:44 
GeneralRe: Autosize columns in a ListView Pin
mav.northwind17-Apr-08 22:44
mav.northwind17-Apr-08 22:44 
GeneralRename Excel sheets after exporting to a new Excel spreadsheet Pin
Walaza17-Apr-08 21:26
Walaza17-Apr-08 21: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.