Skip to content

Instantly share code, notes, and snippets.

@loclamor
Created March 22, 2013 14:16
Show Gist options
  • Save loclamor/5221586 to your computer and use it in GitHub Desktop.
Save loclamor/5221586 to your computer and use it in GitHub Desktop.
SpreadSheetMainWindow::locationFromIndex
const QString SpreadSheetMainWindow::locationFromIndex(int row, int column){
QString s;
column++;
do {
column--;
s = QString('A' + (column % 26)) + s;
column = column / 26 ;
} while(column > 0);
return s + QString::number(row + 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment