English 中文(简体)
Excel细胞的出口图象
原标题:Export bitmap image from Excel cells

我已使用开放式XML框架制作了一个xsx文档,我正在把它植入一个PowerPoint幻灯片(也利用开放式XML创建),问题在于,我需要一个PolObject的股东形象,即Excel坐在Power Point幻灯片上——即可以使用一个标准持有人,但情况不好。

因此,我希望(最有可能使用Interop)找到一种办法,打开xlsx文档,并将相关细胞作为比照图(jpg或.png理想)出口,然后我可以把这些地图作为地主形象输入我的OleObject。

我来到这里:

我试图做些什么,但是在图标上,如果有人知道有办法出口细胞(主要是选择,而不是整个工作表格),那将是巨大的。

感谢

迈克

问题回答

如果有人知道有办法向比图出口电池(主要是选择,而不是整个工作表格)。

A. 与所有边境进行的格式选择

http://stackoverflow.com/questions/60549536/how-can-i-export- from-excel-to-an-image-with-specific-size-or-aspect-ratio> 我怎么能够从Excel出口到具有特定规模(或方面比例)的形象?

Sub ExportExcelSelectionImage()

    exportpath = "C:Users
aresDesktopExcelScreenShot"
    Set xWs = ActiveWorkbook.ActiveSheet
    Set mySel = Selection

     Captures current window view
    sView = ActiveWindow.View

     Sets the current view to normal so there are no "Page X" overlays on the image
    ActiveWindow.View = xlNormalView

     Temporarily disable screen updating
    Application.ScreenUpdating = False

    mySel.CopyPicture xlPrinter

    Set chartobj = xWs.ChartObjects.Add(0, 0, mySel.Width, mySel.Height)
    chartobj.Activate
    chartobj.Chart.Paste
    chartobj.Chart.Export exportpath & ".png", "png"   & TimeValue(Now()) & ".png", "png"
    chartobj.Delete

     Returns to the previous view
    ActiveWindow.View = sView

     Re-enables screen updating
    Application.ScreenUpdating = True

End Sub

形象与格;>>>>>>>>>>>>>>

“在此处的影像描述”/</a





相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签