June 10th, 2003, 10:15 AM
Excel based ifstream?
is it possible to read in data from an excel database using C++? And if so, is it possible to specify read direction (i. e. which numbers it reads in first-last) Thanks.
Last edited by AGibel; June 10th, 2003 at 11:54 AM.
June 10th, 2003, 02:35 PM
That's what OLE is for. Excel will function as an OLE server and your program as an OLE client.
I haven't played with it myself, but at least now you know what TLA ("three-letter acronym") to research.
June 10th, 2003, 03:00 PM
I was hoping that wouldn't be the solution. I had looked into OLE before and was rather baffled. Well, guess I'll give it another try. Thanks.
June 10th, 2003, 08:00 PM
OK, let's back up a wee bit.
Using OLE would require that Excel be running (I think that it automatically starts Excel). But are you instead asking about reading an Excel file itself for the data? That should not require OLE, but instead it would require you to be very familiar with the format of an Excel file. I would think that OLE would be a lot simpler.
Excel can save data to various formats, including comma-separated-values (CSV). Could that be a possible route?
June 10th, 2003, 10:14 PM
CSV huh? Yes that would probably work out well for the reading part. Thanks.