Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Convert int to Excel column name

By Peter Diplaros,

This script converts a numeric column index to an Excel column name (ex: AC). The script doesn't use cursors or any other iteration. It converts the value using only set-based code so it is very suitable for using within a function.

The @ColumnIndex parameter is 1-based (1 = column A)

Total article views: 1334 | Views in the last 30 days: 2
 
Related Articles
FORUM

column size

column size

FORUM

Computed Column

Computed Column

FORUM

split columns

Split columns

FORUM

alter column

alter column

FORUM

add column between two column

add column between two column

Tags
base 26    
columns    
excel    
 
Contribute