Click here to Skip to main content
15,887,350 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SetCheck on click in CListCtrl Pin
Jochen Arndt15-May-13 23:20
professionalJochen Arndt15-May-13 23:20 
GeneralRe: SetCheck on click in CListCtrl Pin
_Flaviu15-May-13 23:24
_Flaviu15-May-13 23:24 
QuestionWriting on BitMap by DC does not work Pin
Member 989133414-May-13 21:17
Member 989133414-May-13 21:17 
AnswerRe: Writing on BitMap by DC does not work Pin
dusty_dex17-May-13 6:26
dusty_dex17-May-13 6:26 
QuestionHow to read-write Excel using MFC, without MS Office? Pin
Caesarea14-May-13 20:03
Caesarea14-May-13 20:03 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Richard MacCutchan14-May-13 21:09
mveRichard MacCutchan14-May-13 21:09 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Member 989133414-May-13 21:14
Member 989133414-May-13 21:14 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Jochen Arndt14-May-13 21:14
professionalJochen Arndt14-May-13 21:14 
There are four ways to read and write Excel files:


  1. Using Excel Automation (COM / OLE Dispatch) with the Excel type library. This requires an installed Excel on the machine running your application and the Excel type library on the development machine.
  2. Using ODBC. Open Database Connectivity is an operating system independent standard for database management. With Excel ODBC drivers, it can be used to read and write Excel files. Because it is a database interface, it handles sheets from an Excel file like tables in a database file. The required Excel ODBC driver is installed by the Windows Setup.
  3. Using ADO (OLE DB). ActiveX Data Objects is like ODBC a database interface, handling sheets from an Excel file like tables in a database file. It is more up-to-date than ODBC. This requires the ADO DLL wich is installed by Windows Setup. ADO may be also used to connect to Excel files using the ODBC drivers using a different connect string.
  4. Using a library that provides reading and writing Excel files.

    Examples are:

    • BasicExcel [^],
    • ExcelFormat Library [^] (based on BasicExcel),
    • LibXL (commercial) [^].


When deciding to use ODBC or ADO, ADO is preferred because the ODBC drivers has some limitations due to bugs and ADO supports accessing fields by value while ODBC only supports text strings.

To use ODBC and ADO with Excel 2007 files (XLSX), the 'Microsoft Access Database Engine 2010 Redistributable' package must be installed.

To exchange data with Excel, two additional methods using text formats can be used:

  1. Creating Text, CSV, RTF, or HTML files that can be opened by Excel and other spreadsheet programs or save data from within Excel in one of these formats.
  2. Providing Text, CSV, RTF, or HTML data for clipboard and OLE Drag&Drop operations.


With Excel 2007, the new OpenXML based file formats (mainly XLSX, XLSB, XLSM) has been introduced. Later versions use the same format. Older Office versions including the viewers can use the new format when installing the Microsoft Office Compatibility Pack.
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Erudite_Eric16-May-13 7:12
Erudite_Eric16-May-13 7:12 
AnswerRe: How to read-write Excel using MFC, without MS Office? Pin
Caesarea16-May-13 19:47
Caesarea16-May-13 19:47 
Questionscrollview issue on win7 environment Pin
Ghost Employee14-May-13 16:54
Ghost Employee14-May-13 16:54 
AnswerRe: scrollview issue on win7 environment Pin
Newbie0017-May-13 8:21
Newbie0017-May-13 8:21 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee21-May-13 0:50
Ghost Employee21-May-13 0:50 
GeneralRe: scrollview issue on win7 environment Pin
Newbie0022-May-13 9:39
Newbie0022-May-13 9:39 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee22-May-13 16:36
Ghost Employee22-May-13 16:36 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee24-May-13 21:02
Ghost Employee24-May-13 21:02 
GeneralRe: scrollview issue on win7 environment Pin
Newbie0025-May-13 0:05
Newbie0025-May-13 0:05 
GeneralRe: scrollview issue on win7 environment Pin
Ghost Employee27-May-13 16:19
Ghost Employee27-May-13 16:19 
QuestionCurrent line of a CRichEditCtrl Pin
ForNow14-May-13 8:53
ForNow14-May-13 8:53 
AnswerRe: Current line of a CRichEditCtrl Pin
David Crow15-May-13 5:44
David Crow15-May-13 5:44 
GeneralRe: Current line of a CRichEditCtrl Pin
ForNow16-May-13 21:08
ForNow16-May-13 21:08 
QuestionRe: Current line of a CRichEditCtrl Pin
David Crow17-May-13 3:12
David Crow17-May-13 3:12 
AnswerRe: Current line of a CRichEditCtrl Pin
ForNow17-May-13 4:24
ForNow17-May-13 4:24 
GeneralRe: Current line of a CRichEditCtrl Pin
David Crow17-May-13 4:47
David Crow17-May-13 4:47 
GeneralRe: Current line of a CRichEditCtrl Pin
ForNow17-May-13 4:54
ForNow17-May-13 4:54 

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.