Read and Compare cells in a excel file with C++ -


i have project read excel file c++, , compare columns see similar, not sure start. need little on getting started on right foot. sorry if asked before, did not see it.

you can use different frameworks such purposes. suggest check out qt: qt docs qaxobject then, can operate excel file in way, example:

qaxobject* excelapp = new qaxobject("excel.application"); excelapp->setproperty("visible", false);   qaxobject* workbooks = excelapp->querysubobject("workbooks");  workbooks->dynamiccall("open (const qstring&)", qstring("path .xls file"));  qaxobject* workbooks = excelapp->querysubobject("activeworkbook");  qaxobject* worksheets = workbooks->querysubobject("worksheets");  qaxobject* worksheet = workbooks->querysubobject("worksheets(int)", 1); qaxobject* usedrange = worksheet->querysubobject("usedrange");  qaxobject* rows = usedrange->querysubobject("rows");  qaxobject* columns = usedrange->querysubobject("columns");   int rowsstart = usedrange->property("row").toint();  int rows = rows->property("count").toint();  int columnsstart = usedrange->property("column").toint();  int cols = columns->property("count").toint();    qaxobject * cell;  (int i(rowsstart); != rowsstart + rows; ++i) {      (int j(columnsstart); j != columnsstart + cols; ++j) {      cell = excelapp->querysubobject("cells(int, int)", i, j );     qvariant val = cell->dynamiccall("value");     // whatever want value here.     }  }  

Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -