C#Flexcel.更改背景单元格的颜色. Excell [英] C# Flexcel. Change the colour of background cell. Excell

查看:116
本文介绍了C#Flexcel.更改背景单元格的颜色. Excell的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Flexcel库,并且想要更改表格(Excel文档)中单元格的颜色.

I am using Flexcel library and want to change the colour of the cell in the table (Excel document).

我该怎么办?我找不到必要的API.我可以用Flexcell做到吗?

How can I do it? I can't found necessary API. Can I do it with Flexcell?

推荐答案

我还没有使用过该API,但是如果找不到方法,这就是使用C#的方法:

I haven't used that API, but if you can't find a way, this is how you can do it with C#:

    //http://www.mvps.org/dmcritchie/excel/colors.htm
    private void setCellColor(Microsoft.Office.Interop.Excel.Range cell, int index)
    {
        cell.Interior.ColorIndex = index;
    }

这篇关于C#Flexcel.更改背景单元格的颜色. Excell的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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