作者:乔山办公网日期:
返回目录:office365
1、打开带有数据的EXCEL表,选中需要创建图标的数据简历一个图表,如本例中创建的为折线图表。
2、在电脑上打开PPT软件,新建一个空白的演示文稿后,回到刚才的EXCEL文件在红,复制新建的图表文件。
3、回zd到PPT的演示文稿中,点击文件下方的粘贴下拉版箭头按钮,选择使用目标主题和链接数据按钮。
4、即可看到在PPT的演示文稿中已经粘贴了EXCEL创建的图表了。
5、将该PPT文件保存后并关闭,回到EXCEL文件中如将原有的徐州市场销量数据115416修改为100。
6、再次打开PPT的文件,点击右键选中编辑数据按钮。
7、此时系统自动弹出之前修改的EXCEL文件,PPT中的图表也自动更新了粘贴过来的图表数据了。
8、可以看到更新前PPT的数据为权左图,更新后的数据为右图。
1、首先将EXCEL表格里面数据选中并zd复制。
2、复制了之后,打开PPT文档,点击开始。
3、然后在开始的栏目找到粘贴,点击它的下拉菜单,然后点击选择性粘贴选项进入专。
4、进入之后点击粘贴链接,在作为的一栏选择粘贴的数属据来源的Excel。
5、设置完毕之后,最后点击页面的确定,这样就可以使PPT中的图表和EXCEL中的数据自动同步更新了。
要想让复制到Word文件中的图表跟随Excel的数据源自动更新,需抄要将Excel图表以链接的形式粘贴到Word文档中。
1.在Excel中选中建立完成的图表,执行复制操作。
2.切换到Word文档中,选择“编辑袭→选择性粘贴百”命令,打开“选择性粘贴”对话框,选中“粘贴链接”单选按钮。
3.单击“确定”按钮退出。当在Excel中对图表数据度源进行更改后,Word文档中的图表也会相应地改变。
批量操作的话需要使用VBA程序。
可以参考这篇文章:http:///FAQ00759_Search_-_Replace_to_change_OLE_link_paths.htm
我稍微完善了一下他的程序。他的程序原来e79fa5e98193e58685e5aeb9363只能更改插入的OLE对象,对于图表(Charts)的路径是不能更改的,而且每次使用都需要到VBA里去改代码。我这个不需要改代码了,只需要按Atl+F8,直接运行就行了。
Sub ChangeOLELinks()
' Note: this will only work in PPT 2000 and later
Dim oSld As Slide
Dim oSh As Shape
Dim sOldPath As String
Dim TpOldPath As String 'Temp Old Path, used to get file name without path
Dim sNewPath As String
Dim i As Integer, j As Integer
'Get the old path of OLE objects
For Each oSh In ActivePresentation.Slides(1).Shapes
If oSh.Type = msoLinkedOLEObject Or oSh.Type = msoChart Then
TpOldPath = oSh.LinkFormat.SourceFullName
If TpOldPath <> "" Then Exit For
End If
Next
If TpOldPath = "" Then
MsgBox ("Cannot find Linked OLE Object or Chart Object. Procedure terminated.")
Exit Sub
End If
'Remove the FileName in the Path if the file is stored in LOCAL and uses back slash "\"
For i = 1 To Len(TpOldPath)
If InStr(i, TpOldPath, "\") > 0 Then
i = InStr(i, TpOldPath, "\")
j = i
End If
Next i
If j > 0 Then
TpOldPath = Left(TpOldPath, j - 1)
Else
'Remove the FileName in the Path if the file is stored in SERVER and uses forward slash "/"
For i = 1 To Len(TpOldPath)
If InStr(i, TpOldPath, "/") > 0 Then
i = InStr(i, TpOldPath, "/")
j = i
End If
Next i
TpOldPath = Left(TpOldPath, j - 1)
End If
sOldPath = InputBox(prompt:="Please enter the OLD OLE Link Path", Default:=TpOldPath)
sNewPath = InputBox("Please enter the NEW OLE Link Path", Default:=ActivePresentation.Path)
On Error GoTo ErrorHandler
For Each oSld In ActivePresentation.Slides
For Each oSh In oSld.Shapes
' Change only linked OLE objects
If oSh.Type = msoLinkedOLEObject Or oSh.Type = msoChart Then
On Error Resume Next
' Verify that file exists
If Len(Dir$(Replace(oSh.LinkFormat.SourceFullName, sOldPath, sNewPath))) > 0 Then
oSh.LinkFormat.SourceFullName = Replace(oSh.LinkFormat.SourceFullName, sOldPath, sNewPath)
Else
MsgBox ("File is missing; cannot relink to a file that isn't present")
End If
On Error GoTo ErrorHandler
End If
Next ' shape
Next ' slide
MsgBox ("Done!")
NormalExit:
Exit Sub
ErrorHandler:
MsgBox ("Error " & Err.Number & vbCrLf & Err.Description)
Resume NormalExit
End Sub