Click here to Skip to main content
15,902,198 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Good Friends,

Please help me. I need your help.

Regarding excel spreadsheet at row 1 and Column.cells 1 to Column.cells 5, I am trying to do merge cells in order to insert customer company name on it, but the coding is not working as I didn't done it before. Please help me.

Here are the coding relating to it.

C#
Microsoft.Office.Interop.Excel.Application  objExcel;
Microsoft.Office.Interop.Excel.Workbook objWrkbook;
Microsoft.Office.Interop.Excel.Worksheet objWrkSheet;
Object objRange =  System.Office.Interop.Excel
ObjExcel.Visible = true;	
intRow = 1;
objWrkSheet =(objWrkSheet.Cells[intRow, 1] , objWrkSheet.Cells[intRow,5]).MergeCells = true;
//display Customer Company name on row 1 Merged cells.
obkWrksheet.Cells(intRow,1) = this.txtCompanyName.text; 
Posted
Updated 11-Dec-10 2:42am
v3

 
Share this answer
 
Hullo Eswa,
Thank you very much for sharing the URL link with me.
You are wonderful.

When I look at the sample coding I notice that there was no Declaration of EXCEL .com or DLL library as Namespace.

What must I do ?
.


Cheers,
Lennie
 
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