Click here to Skip to main content
15,919,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to convert a macros code to c# code that i used in excel how can i do dat???

1 solution

Probably not. You are talking about different platforms without total one-to-one correspondence; and they are actually very different. You can translate some part of code, which is not platform- or API-specific.

For writing C# code in this field, you will need to use Microsoft Office Interop. As after the installation of the Office the interop assemblies are put in GAC, you can reference it from the tab ".NET" of the "Add Reference" windows of Visual Studio. It will come under the name like "MS Office Interop Excel …" (of appropriate version).

Please see:[^].

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