ClosedXML删除Excel表格中的当前格式 [英] ClosedXML removes the current formatting in Excel Sheets

查看:541
本文介绍了ClosedXML删除Excel表格中的当前格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在为我的应用程序使用ClosedXML。我使用以下代码将一些值写入现有工作表。

Hi All,

I am using ClosedXML for my application.I used the following codes to write some values into the existing worksheet.

XLWorkbook tasklog = new XLWorkbook("TaskLogTemplate.xlsx");




IXLWorksheet Ws = tasklog.Worksheet(sheetName);
                Ws.Cell(1,3).Value = "ProjectName";
                Ws.Cell(2,3).Value = "LogTitle";
                Ws.Cell(3,3).Value = "ModelHead";
                Ws.Cell(2,5).Value = "PHead";
                tasklog.Save();



但它删除了相邻单元格的格式,如边框样式,颜色等。

可以有人帮助我。我尝试在ClosedXML论坛中搜索但没有找到解决方案....

先谢谢。


But it removes the formatting of adjacent cells such as border style, color etc.
Can anyone help me. I tried search in ClosedXML forums but no solutions found....
Thanks in Advance.

推荐答案

请阅读我的评论问题。



我建议阅读文档: https:// closedxml .codeplex.com / documentation [ ^ ]
Please, read my comment to the question.

I'd suggest to read the documentation: https://closedxml.codeplex.com/documentation[^]


这篇关于ClosedXML删除Excel表格中的当前格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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