Use Excel Interop to grab image of Excel chart without writing to disk or using the clipboard

后端 未结 2 1771
太阳男子
太阳男子 2021-01-14 23:53

The interface to the chart object in Excel only allows access to the image representing the chart through two methods:

  • export, which saves the image to a file<
2条回答
  •  情话喂你
    2021-01-15 00:39

    One option that may work would be to use a memory mapped file. Of course disk can be involved there, so you should profile the standard export to disk vs. using a memory mapped file (assuming the slowness of disk i/o is your only concern with that approach).

    They don't have out of the box support in .Net yet, but there likely plenty of implementations out there.

提交回复
热议问题