Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
C#
Want to change Excel header cells names from A,B,C to 1,2,3 using R1C1 option but i want to do this using C# coding


What I have tried:

Want to change Excel header cells names from A,B,C to 1,2,3 using R1C1 option but i want to do this using C# coding
Posted
Updated 9-Jun-16 4:44am
Comments
ZurdoDev 9-Jun-16 8:29am    
Record a macro doing it and then you'll see the code.
CHill60 9-Jun-16 8:37am    
Very good advice from @RyanDev above. But I would like to point out that the "What I have tried:" section is for you to post the code you have tried. As things stand we have no idea how you are handling the excel spreadsheet in your code
Member 11710200 9-Jun-16 9:31am    
Can you state few details ?
1. How are you interacting with the excel , are you creating or exporting it through code ?
2.Are you directly dealing with a excel file that is present in the system ?

why dont u use ClosedXml nuget package

ClosedXML - The easy way to OpenXML - Documentation

that should allow you too manipulate excel files etc and there is sample code with each feature
 
Share this answer
 
v2
Application.ReferenceStyle = xlR1C1
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900