Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am exporting some data to excel files. so files came.with Other excel file is there with same cells. I want to copy the cell with data of one file to other excel file with the help of c#. how can I do this.

What I have tried:

I searched in google but no suitable result.
Posted
Updated 1-Sep-17 2:36am
v4

Another option is the ClosedXML library available via Nuget.
[^]
Some documentation and examples here:
Home · ClosedXML/ClosedXML Wiki · GitHub[^]
 
Share this answer
 
 
Share this answer
 
An addendum to Richard's solution, here is a simple trick that I use...

To learn the excel commands to perform the task from C#, open an excel spreadsheet, start the macro recorder, do the actions manually that you want your C# app to perform, stop the macro recorder, and view the macro generated by excel. Now you know the commands that your C# app must perform.
 
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