Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将html文件导入excel-正确使用调色板_C#_Html_Excel_Colors_Import - Fatal编程技术网

C# 将html文件导入excel-正确使用调色板

C# 将html文件导入excel-正确使用调色板,c#,html,excel,colors,import,C#,Html,Excel,Colors,Import,我有一个html文件,其中包含一个表,该表使用颜色来表示不同类型的数据。我需要能够导入到excel与正确的调色板这个 我正在使用以下方法导入html文件: //using Microsoft.Office.Interop.Excel; var excel = new Application(excel); excel.Workbooks.OpenXML(fileName); //where filename is the path to the html file. 我正在使用 _excel

我有一个html文件,其中包含一个表,该表使用颜色来表示不同类型的数据。我需要能够导入到excel与正确的调色板这个

我正在使用以下方法导入html文件:

//using Microsoft.Office.Interop.Excel;

var excel = new Application(excel);
excel.Workbooks.OpenXML(fileName); //where filename is the path to the html file.
我正在使用

_excel.Workbooks[1].Colors
添加html文件中使用的颜色


这似乎改变了电子表格中某些元素的一些颜色,但不是我所期望的颜色。我需要按什么顺序添加它们?我可以将excel中的调色板扩展到56以外吗?导入html文件时,如何在excel中使用调色板?

调色板有56个条目。据我所知,你不能改变这一点。

可以创建一个新的调色板,并使用应用程序覆盖当前的调色板。Excel或Powerpoint中的级别插件?