我正在使用 c# 写入 excel 文件并为特定单元格着色。我将代码用作:
Workbook wbook = new Workbook();
Worksheet sheet1 = wbook.Worksheets[0];
sheet1.Columns[j].Style.BackgroundColor = System.Drawing.Color.DeepPink;
wbook.SaveAs("E:\\new.xls");
System.Diagnostics.Process.Start("E:\\new.xls");
wbook.Close();
但工作簿抛出错误:
Retrieving the COM class factory for component with CLSID {00020819-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
任何人都可以帮助..