Project::GetCommonColumns
GetCommonColumns
Description
It provides all the columns (by names or prefixes) that are common between the worksheets whose names are supplied. If only one worksheet is supplied, all its columns are returned.
Syntax
BOOL GetCommonColumns( const vector<string> & worksheets, vector<string> & columnNames, vector<string> & columnLabels, DWORD dwMode, vector<string> & columnheadings = NULL )
Parameters
- worksheets
- [input] the names of all the worksheets to consider. They are in the form WksPageName or WksPageName!WksLayerName
- columnNames
- [output] the names of all the common columns. There are certain restriction on which columns should be considered "common enough" to be included.
- columnLabels
- [output] the labels from the 1st worksheet for the corresponding columns
- dwMode
- [input] bits to control how to scan for common columns
- COMMCMODE_SHORT_NAMES, COMMCMODE_LONG_NAMES will decide if matching if done by short or long name
- COMMCMODE_COL_INDEX if no name matching at all and just use column index
- COMMCMODE_KEEP_ORDER TRUE if common columns must follow same order as in the first worksheet, FALSE if the order of columns are not important
- columnheadings
- [output] the column headings
Return
TRUE if successful, FALSE otherwise
Examples
EX1
void Project_GetCommonColumns_ex1()
{
vector<string> wksNames = {"Book1","Book2"};
vector<string> colNames;
vector<string> colLabels;
BOOL bRet = Project.GetCommonColumns(wksNames, colNames, colLabels, FALSE);
}
Remark
See Also
header to Include
origin.h