Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
C# で Excel シートの特定のセルに色を付けたい。私はこのコードを使用しています:
((Range)worksheet.Cells[2, 1]).Interior.Color = XlRgbColor.rgbDarkRed;
しかし、それは例外をスローしています:
HRESULT からの例外: 0x800A03EC
どうすればこれを解決できますか?
これを試してください、それはあなたの問題を解決します
((Range)worksheet.Cells[i + 2, j + 1]).Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);