将链接的单个 excel 单元格粘贴到 PowerPoint 文本中
Paste linked single excel cell into powerpoint text
我正在尝试像这样复制单个 excel 单元格:
插入现有的 powerpoint 幻灯片,在现有的单元格中,如下所示:
我尝试做的是"Paste special",在下图中粘贴link。请注意,我需要手动将其拖到那里,这已经不需要了。
但结果是 "fake cell",我必须手动将其拖动到正确的位置,而不是我需要的常规文本。有没有人知道更好的解决方案来获得第二张图片中的自动化结果?
提前致谢!
Dim xlsApp As Object
Dim xlsWB As Object
Set xlsApp = CreateObject("Excel.Application")
Set xlsWB = xlsApp.Workbooks.Open(ActivePresentation.Path & "\" & "FileName.xlsx")
ActivePresentation.Slides(1).Shapes("Subtitle").TextFrame.TextRange = "The excel sheet content should appear here within this text: " & xlsWB.Worksheets(1).Range("A1")
xlsWB.Save
xlsWB.Close
xlsApp.Quit
Set xlsWB = Nothing
Set xlsApp = Nothing
您可以更改幻灯片索引。您可以通过选择窗格自定义形状的名称。
使用 vbNewLine
在行之间添加一个分隔符。
使用 For Loops
自动执行此操作。
我正在尝试像这样复制单个 excel 单元格:
插入现有的 powerpoint 幻灯片,在现有的单元格中,如下所示:
我尝试做的是"Paste special",在下图中粘贴link。请注意,我需要手动将其拖到那里,这已经不需要了。
但结果是 "fake cell",我必须手动将其拖动到正确的位置,而不是我需要的常规文本。有没有人知道更好的解决方案来获得第二张图片中的自动化结果?
提前致谢!
Dim xlsApp As Object
Dim xlsWB As Object
Set xlsApp = CreateObject("Excel.Application")
Set xlsWB = xlsApp.Workbooks.Open(ActivePresentation.Path & "\" & "FileName.xlsx")
ActivePresentation.Slides(1).Shapes("Subtitle").TextFrame.TextRange = "The excel sheet content should appear here within this text: " & xlsWB.Worksheets(1).Range("A1")
xlsWB.Save
xlsWB.Close
xlsApp.Quit
Set xlsWB = Nothing
Set xlsApp = Nothing
您可以更改幻灯片索引。您可以通过选择窗格自定义形状的名称。
使用 vbNewLine
在行之间添加一个分隔符。
使用 For Loops
自动执行此操作。