C#NET2008 Excel MergeCells问题 [英] C#NET2008 Excel MergeCells Problem

查看:53
本文介绍了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#创建Excel文档 [
Hi see these links
Using C# to Create an Excel Document[^]


Hullo Eswa,
非常感谢您与我分享URL链接.
你真棒.

当我查看示例代码时,我注意到没有EXCEL .com或DLL库声明为命名空间.

我必须做什么 ?
.


干杯,
列尼
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


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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆