troubleshooting Question

Convert Excel Cell coords to x,y ( C# )

Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America asked on
.NET ProgrammingC#
4 Comments2 Solutions311 ViewsLast Modified:
In C#, I need code that will convert an Excel column / row coordinate to zero-based x,y (ordinal) values.  Assume no VSTO or Interop support.

I need to support the following:

A1 (0, 0)
A500  (500, 0)
AA1   (0, 26)
AA500 (500, 26)
XFD5 (5, 16384)   (which is as far as I can go, column-wise)

*** NOTE:  in Excel you can obtain the column value with formula:


But like I said, I need to be able to do this programmatically in C# without the benefit of Excel Interop or VSTO.

Thank you!
Join our community to see this answer!
Unlock 2 Answers and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros