如何使用OpenXML获取单元格背景颜色 [英] How to get a cell background color using OpenXML

查看:128
本文介绍了如何使用OpenXML获取单元格背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我是openxml的新手,我想使用openxml获取Excel中单元格的背景颜色,但我不知道如何开始吧。



任何人都可以帮助我吗?

非常感谢

Hi guys

I am new to openxml, I want to get the background color for a cell in Excel using openxml, but i don't know how to start it.

Anyone can help me ?
Many thanks

推荐答案

请参阅此答案 [ ^ ]。


感谢您的帮助Mario。

我在链接中尝试过这个例子但是它没有给我确切的背景细胞的颜色。有时候,即使单元格的颜色存在,我也会得到对象引用null异常。还有一些基于索引的颜色,我不理解解码。任何代码示例都将非常有用。
Thanks for your help Mario.
I have tried the example in the link But it is not giving me the exact background color of the cell. some times i am getting object reference null exception as well even when the color is present for the cell. also there are some indexed based colors which i am not understanding to decode. any code example will be greatly help full.


这篇关于如何使用OpenXML获取单元格背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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