MCPcopy Create free account
hub / github.com/breck7/scroll / createCellPos

Function createCellPos

external/.datatables.js:15903–15915  ·  view source on GitHub ↗

* Convert from numeric position to letter for column names in Excel * @param {int} n Column number * @return {string} Column letter(s) name

(n)

Source from the content-addressed store, hash-verified

15901 * @return {string} Column letter(s) name
15902 */
15903 function createCellPos(n) {
15904 var ordA = "A".charCodeAt(0)
15905 var ordZ = "Z".charCodeAt(0)
15906 var len = ordZ - ordA + 1
15907 var s = ""
15908
15909 while (n >= 0) {
15910 s = String.fromCharCode((n % len) + ordA) + s
15911 n = Math.floor(n / len) - 1
15912 }
15913
15914 return s
15915 }
15916
15917 try {
15918 var _serialiser = new XMLSerializer()

Callers 3

_excelMergeCellsFunction · 0.85
addRowFunction · 0.85
.datatables.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected