本文介绍了C#NET2008 Excel MergeCells问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

请帮我.我需要你的帮助.

关于行1和Column.cells 1到Column.cells 5的excel电子表格,我试图做合并单元格以便在上面插入客户公司名称,但是编码没有用,因为我之前没有做过.请帮帮我.

这是与此有关的编码.

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.

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; 

推荐答案



这篇关于C#NET2008 Excel MergeCells问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 06:22