Sometimes we need to control c# .net excel class in our program in order to make the Microsoft Office c# excel interop assembly working properly. The application program must process a batch of spreadsheets and deal with excel worksheets. Here I would like to offer some tips on c# excel interop performance and introduce you some fundamentals about using the c# excel interop assembly.

To begin with, we should create a new C# excel interop class file in Visual Studio and we can call it something like Excel Interop. And conveniently, we are free to use something more familiar or standard or add underlines to class file to make the Excel namespace handy.

The issue of compatibility in the Excel program on the Apple Mac OS X platform, however, is not trivial. The code above shows one solution, which is to use get Value () instead of Value2. Excel stores OA dates in different formats on Macs and PCs. The function get Value () returns objects that do not vary based on the original platform.

If the program is compatible in all aspects, the process would be performed very smoothly. In case you do some wrong in your c# .net excel processing which results in a long time waiting to process even 5 spreadsheets at one time. Then you are advised to try the Cells [] indexer on a range or getting the range with the Range property.

The important thing is that we must include namespace in your c# .net excel program. We have to use the Add Reference command for this, use Visual Studio's GUI to add an assembly to the application program. Once completed this, you will need a class.

Given all the stuffs I have talked about, we have saw how to start with C# excel interop class and avoid serious performance problems such as compatibility with the assembly.