Click here to Skip to main content
15,892,797 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to merge cells in an excel sheet using C#.
I am using this::
C#
xlWorkSheet.Range[xlWorkSheet.Cells[1, 1], xlWorkSheet.Cells[1, 4]].Merge();

But When I use this, only the value that is present in the cell[1,1] is being saved in the excel but all the values in the cell [1,2],[1,3],[1,4] is removed.
How can I keep all the values from those four cells in one cell while merging?
Posted
Updated 9-Aug-14 5:13am
v2

Hello check this :

Merge cells in Excel using C#[^]
 
Share this answer
 
Similar post on this forum

How to Merge Excel files via C#[^]
 
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