* Creates generic column names like "A", "B", ..., "Z", "AA", "AB", ... , "ZZ", "COL", "COL" * https://stackoverflow.com/questions/2294443/base-conversion-problem */
| 58 | * https://stackoverflow.com/questions/2294443/base-conversion-problem |
| 59 | */ |
| 60 | std::string Helper::createGenericColumnNames(int col) { |
| 61 | int v = col + 1; |
| 62 | int base = 26; |
| 63 | std::string res = ""; |
| 64 | while( v != 0 ) { |
| 65 | --v; |
| 66 | res.insert(0, 1, (char)('A' + (v % base))); |
| 67 | v /= base; |
| 68 | } |
| 69 | return res; |
| 70 | } |
| 71 | |
| 72 | |
| 73 | /** |