将 Excel 数据导出到 PowerPoint 演示文稿
我正在尝试为 Powerpoint 编写一个加载项,用户应该能够选择 Excel 工作表中的单元格,然后转到他想要粘贴该表格的 Powerpoint 幻灯片,启动加载项后,宏应该创建一个表格并逐个单元格复制。然后,宏将根据我们的格式化指南格式化 PowerPoint 表格。我现在遇到一些问题:
1)如何遍历Excel中选定范围内的单元格,我尝试循环遍历选定范围内的单元格,但这既不计算选定范围内的行/列有效(我对 Excel VBA 相当不熟悉)
2) 将数据从 Excel 复制到 Powerpoint 的最佳方法是什么?我看到一些使用字符串数组的建议,首先读取所有数据;有些用户重复使用一个变量来复制数据,有些用户直接从 XL 复制到 PPT 参考,不同方法的优点是什么?
多谢 s
I am trying to write an add-in for Powerpoint, the user should be able to select cells in an Excel worksheet and then go to the Powerpoint slide he would like to paste that table in, after starting the Add-in, a macro should create a table and copy cell by cell. Afterwards the macro will format the PowerPoint table according to our formatting guidelines. I am running into some issues now:
1) How can I go through the cells within a selected range in Excel, I tried to loop through the cells within the selected range, but neither this nor counting the rows/columns with in the selected range works (I am rather unfamiliar with Excel VBA)
2) What is the best way to copy data from Excel to Powerpoint? I have seen some suggestions that use a string array, that reads in all the data first; some users re-use one variable to copy the data and some do it directly from a XL to a PPT reference, what are the advantages of the different approaches?
Thanks a lot
s
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于你的第一个问题,这里有一段有效的代码片段(但这取决于你打算做什么):
对于你的第二点,它取决于你期望的结果:
一旦您做出选择,就可以轻松地在网络上找到资源来执行您想要的操作。
For your first question, here is a snippet of code that works (yet, it depends on what you intend to do):
For your second point, it depends on the results you expect :
Once you have chosen, it's easy to find ressources on the web to do what you want.