Programmatically (C#) convert Excel to an image

前端 未结 6 800
轻奢々
轻奢々 2020-12-29 11:32

I want to convert an excel file to an image (every format is ok) programmatically (c#). Currently I\'m using Microsoft Interop Libraries & Office 2007, but it does not s

6条回答
  •  我在风中等你
    2020-12-29 11:49

    This is a bug with GDI+ when it comes to converting metafiles to a bit map format.
    It happens for many EMFs that displays charts with texts. To re-create, you simply need to create a chart in excel that displays data for its X and Y axis. Copy the chart as a picture and paste in word as a metafile. Open the docx and you will see an EMF in the media folder. If you now open that EMF in any windows based paint program that converts it to a bitmap, you will see distortions, in particular, text and lines become larger and distorted. Unfortunately, it is one of those issues that Microsoft is not likely to admit or do anything about. Let's hope Google and Apple take over the office/word processing world soon as well.

提交回复
热议问题