# 1730. Spreadsheet Notation Conversion

{% embed url="<https://www.lintcode.com/problem/spreadsheet-notation-conversion/description?_from=ladder&&fromId=156>" %}

很像 171. Excel Sheet Column Number 的reverse version.

```python
class Solution:
    """
    @param index: the index to be converted
    @return: return the string after convert.
    """
    def convert(self, index):
        head, n = (index-1)//702+1, (index-1)%702+1

        string = ""
        while n > 0:
            n, remainder = divmod(n - 1, 26)
            string = chr(65 + remainder) + string
            
        return str(head)+string
```
