我如何使用C#代码格式化Excel工作表 [英] how can i format excel sheet using c# code

查看:67
本文介绍了我如何使用C#代码格式化Excel工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hi
我已经完成了从数据库导出数据并将其保存到Excel工作表中的代码.
现在我想使用C#代码设置Excel文件单元格的宽度和高度.

我已经在excel中看到了该功能自动调整行高和自动调整行宽"
如何在我的程序中使用该功能来设置行的高度和宽度.

我也想在Excel单元格中设置图像,这是我的报告表的标题.我可以从C#中做到吗.尽管excel支持图像(* .jpg)

请帮我...

谢谢
问候
Sagar55

hi
i have made the code that export my data from database and save it into the excel sheet.
now i want to set the width and height of the cells of excel file using c# code.

i have seen the function in excel "autofit row height and autofit row width"
how can i make the use of that function in my progrom to set the height and width of the row.

Also i want to set the image in the excel cell which is the banner of my report sheet. can i do it from c#. though excel support the image(*.jpg)

pls help me ...

Thanks
Regards
Sagar55

推荐答案

如果您使用的是Office的Microsoft工具来生成工作表,我确定您可以选择设置这些内容.文档说什么?这就是您创建工作表的方式吗?
If you''re using the Microsoft Tools for Office to generate your sheet, I am sure you have options to set those things. What does the documentation say ? Is that how you''re creating your sheet ?


这篇关于我如何使用C#代码格式化Excel工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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