How to set cells' background?

前端 未结 2 683
时光说笑
时光说笑 2021-01-12 03:51

How to set the background of several cells within a row (or of a whole row) in OpenXml?

Having read several articles:

  1. Coloring cells in excel sheet usi
2条回答
  •  灰色年华
    2021-01-12 04:42

    You have 3 options:

    1. Use MS lib ExcelDataReader which requires your server installing Office and usually does not work if your program is running in IIS.

    2. Use closed source libs.

    3. Use OpenXML.

    Try my code using pure OpenXML: https://stackoverflow.com/a/59806422/6782249

提交回复
热议问题