Category Archives: Excel

Convert between Excel column numbers and names in C#

Excel uses both numbers and names to identify columns. A = 1, B = 2, …, Z = 26, AZ = 27, …, XFD = 16,384. This example converts between these Excel-style column numbers and names. It’s a little trickier … Continue reading

Posted in algorithms, Excel, Office | Tagged , , , , , , , , , | 2 Comments

Make a C# DLL and use it from Excel VBA code

This example shows how to make a C# DLL and then use it from VBA code running in Excel. A similar procedure should work for other Office applications. Note that some of the steps may require modification and significant fiddling … Continue reading

Posted in Excel, interoperability, Office, VBA | 13 Comments