CodeGoose
June 8th, 2005, 03:49 PM
Hello. I'm trying to read an excel file into a MFC c++ program by using the technique used in the following article.
http://www.codeguru.com/Cpp/data/mfc_database/microsoftexcel/article.php/c1131
Mostly working well except I'm having a problem with one of the columns in my database. I have a column specified as General number format as the entry can be either text, an int, or a number range (2-5). I'm reading this as a Cstring in CRecordset derived class, which seems to be working well except in the case where the entry is just an in. So it reads in a text string or range correctly, but when the entry/cell is a single value ie) 3, it doesn't read anything !?!?!
Any thoughts on why this might occur? I've tried redoing the class and trying different reading/data types, but all with the same result. have also tried different cell format types.
Any help or thoughts would be greatly appreciated.
Thanks.
http://www.codeguru.com/Cpp/data/mfc_database/microsoftexcel/article.php/c1131
Mostly working well except I'm having a problem with one of the columns in my database. I have a column specified as General number format as the entry can be either text, an int, or a number range (2-5). I'm reading this as a Cstring in CRecordset derived class, which seems to be working well except in the case where the entry is just an in. So it reads in a text string or range correctly, but when the entry/cell is a single value ie) 3, it doesn't read anything !?!?!
Any thoughts on why this might occur? I've tried redoing the class and trying different reading/data types, but all with the same result. have also tried different cell format types.
Any help or thoughts would be greatly appreciated.
Thanks.