I want to embed specific cells from a spreadsheet in a powerpoint presentation. I have seen this done before with macros (I think), but I have never done it myself. I have done a little googling and am coming up with 50 solutions. Can someone help me narrow it down.
The big gotcha here is that both of these files will be in one folder in a document library in a sharepoint site. The other gotcha, which is kind of a given, is that I want the ppt to update to latest excel data when it is opened.
This is much simpler than I thought. Here is the answer for anyone else who is attempting this:
Make sure the files are in their final folders you want them in
Open the files
Select the Cells you want to display in the ppt - Ctrl - C to copy
Edit -> Paste Special in the ppt slide you want the cells to display on
Paste as a MS Excel Worksheet Object AND select the "As a Link" checkbox on the left
Size it however you want
Save the ppt
Each time you open the ppt you select "update links" and the ppt gets the latest data from the xls
The sharepoint part is no big deal, it appears to just work like it would if the files were local
These instructions are for Office 2003, they are likely similiar for other officer versions.
Related
The Problem
I have an Excel workbook that prompts the user for some actions every time it is opened.
This same workbook contains charts that are linked in a PowerPoint file. These links were created by copying the charts in Excel and then, in the PowerPoint file, clicking "Paste Special", choosing "Paste Link", and selecting "Microsoft Excel Worksheet (code) Object" as the link type.
Every time the PowerPoint file is opened, I am prompted to update the links in the document.
The trouble is that, while PowerPoint is updating links, the Excel prompts that are intended for the user are shown and have to be clicked (multiple times) during the link update process.
Is it possible for my VBA code to detect when it's being opened for the purposes of updating links so I can skip the user prompts? I should note, in case it matters, that I'm using Microsoft Office 365 on Windows 10.
What I've Tried
I've tried monitoring the value of ThisWorkbook.ReadOnly, Application.Interactive, and Application.IsSandboxed during startup, but they all appear to have the same values regardless of whether the workbook is opened for the purposes of updating links or not. I'm not familiar enough with how link updating works to know what else to check for.
I've identified a couple of possible work-arounds:
First, if the Excel workbook is opened before PowerPoint is opened and the link update process starts, then the prompts don't appear. This will work, if there's no better solution.
Second, I could create a second "shadow" Excel workbook with charts generated from data in the first spreadsheet, but without user prompts. If PowerPoint links to the charts in the "shadow" workbook, then links are updated without issue. This is far from ideal because of the need to keep the two workbooks in sync.
I'm hoping for an elegant automated solution.
The problem
I have eight Excel documents that are stored on a Sharepoint site. One of those documents (“receiving file”) contains formulas/cell references to the other seven documents (“source files”) on Sharepoint.
Everything works when the references are created.
Once the workbooks are saved and closed and then reopened, the receiving file no longer updates the values from the source files.
The files are synced in Windows Explorer and opened in the desktop version of Excel. Also, all eight files are opened at the same time.
The reference will first look something like this
='[Source file.xlsx]Sheet1'!$A$1
After closing and reopening, the references will look like this
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
If I now change a value in the source value, the change will not appear in the receiving file.
What I tried so far
Setting “Calculation” to “Automatic.
Click “Calculate Now” and “Calculate Sheet”.
Double-click into the cell with the reference and hit enter.
In “Data > Queries & Connections” click “Refresh all”
In “Data > Queries & Connections > Edit Link” I clicked on update values. It did not help. However, I tried to rebuild a simple system with just two files and a single reference, and here it did work
Starting from point 5) I programmed a little macro that updates all links in all open workbooks (it did not help either):
Option Explicit
Sub UpdateAllConnections()
Dim wbWorkbook As Workbook
For Each wbWorkbook In Application.Workbooks
wbWorkbook.UpdateLink Name:=wbWorkbook.LinkSources, Type:=xlExcelLinks
Next wbWorkbook
MsgBox "Update complete.", vbInformation, "Complete"
End Sub
If I remove the path to SharePoint, so the formula looks like this
='[Source file.xlsx]Sheet1'!$A$1
It works again (until I save and reopen).
I found the following on Microsoft Answers (about OneDrive but it's probably the same issue):
https://answers.microsoft.com/en-us/msoffice/forum/all/excel-value-links-not-updating-on-onedrive/e48a7680-71e6-4a77-9eb1-e03ec7f0e3e0
I contacted the official O365 support desk and they told me this is built into the connection between Excel and OneDrive.
They have received thousands of complaints and there is no fix for it.
No option to tell Excel/Office/OneDrive to link to local copies of files on 1D by default.
No fix is planned as this is not how MS envisions how Excel/1D should be used.
My question
Any suggestions? Are there any tools in Excel that can be used to update the linked cells automatically or manually? Might SharePoint settings prevent the update?
If not, since removing the file path to SharePoint seems to work is there a way (using VBA) to remove the full file path from all cell references, so
='https://somecompanyname.sharepoint.com/sites/SitefortestingExcelreferences/Shared Documents/[Source file.xlsx]Sheet1'!$A$1
becomes
='[Source file.xlsx]Sheet1'!$A$1
I could probably loop through all cells and simply replace the path with nothing, but that would only work if I know the file path beforehand and if all the files are stored in the same SharePoint folder.
I had the same issue and here is my workaround: I can open the source file on the Sharepoint site by clicking ... and then Open in App (as opposed to Open in Browser) The referecence cell in the receiving file will become ='[Source file.xlsx]Sheet1'!$A$1 again and get automatically updated.
My workaround would be to consolidate external links onto a single sheet, and manually or use a macro to copy / hard paste to another identical page that you use for the links.
Just run the macro when you have the workbook open on your desktop to update the values.
Even simpler, you could also have a sort of database with linked values in a column and hard copies pasted into another column. This would be simpler than two identically sized sheets.
BUT, you could also go crazy and have named ranges like quarterly_total_formula and an analogue somewhere else called quarterly_total_valueonly and then write a macro to iterate over each with a for each looking for things "LIKE" *_formula and hard paste each result into the complementary *_valueonly spot... but then you'd need a macro to check that they were all paired... and by that point you might as well not waste your time in Excel and develop in Power BI, Tableau, RMarkdown, or heck learn Adobe Illustrator or work directly in HTML.
I have a Powerpoint file with many charts that I expect many different users to use with their own data. I'm trying to make this Powerpoint as easy to use as possible by writing VBA into each data source (by data source, I mean the default Excel sheet that is embedded in Powerpoint when you select "Insert" > "Chart"). My goal is to allow them to click the chart, select "Edit data," paste info from a PivotTable into the Excel window that pops up, and let the macro does the rest. The code I can write myself, but I have a different problem:
I've tried writing macros in these embedded Excel files but they do not save once they are closed (I assume they must be .xls or similar and not .xlsm). How can I get these macros to save? I've tried drag and dropping .xlsm files into Powerpoint, but it shows the actual charts on the slide and it's difficult to work with. I'd like the Excel files to be hidden from Powerpoint view and easily accessed using the "Edit data" option.
I hope this description makes sense, if not I can explain further / answer any questions.
Thanks!
Can't you just provide PowerPoint charts, and have them paste data into each chart's DataSheet in PowerPoint?
Of late, PPT does its best to convert pasted charts into PowerPoint charts (same basic engine as Excel charts but they're not Excel objects). You can get round this if you copy the chart from XL, switch to PPT and on the Home tab, click the downward pointing arrow below Paste, pick Paste Special and choose to paste as embedded Excel chart object.
You can then doubleclick the pasted object and Excel will launch for in-place editing.
Or you can right-click, choose "Macro enabled worksheet object" or whatever, and then opt to Open or Edit. Edit gives you in-place editing within the PPT window, Open launches the embedded data in a full copy of Excel.
I have pasted (paste special, paste link) data a cell in Excel into PPT.
I update the excel data and simultaneously I can see the data change in the PPT slide (edit mode)
However, when I run the PPT slideshow:
the data does not update (in PPT when I update in Excel)
the data no longer updates, even when I return to PPT edit mode
Does anyone know if it's possible to have a live link within the PPT slideshow?
(that's not broken by running the slideshow).
[MSOffice 2010 on Win7] VBA can probably help, but I'm not a VBA programmer...
This stackoverflow.com link is very similar, but needs VBA: Linked Excel Object in Powerpoint wont update when showing in slideshow
TIA
PS Context: This is so that I can display an ever-changing number at an auction on one screen (eg on PPT slide), when I change the data on another (eg Excel) using [dual display: laptop + TV]
This needs to be done using VBA and a class module, as far as I'm aware. There are several potential solutions in the link you provided, but without VBA, I don't think this is possible.
Fortunately, someone else has created an add-in designed to resolve the problem you're facing. I think this may be for an earlier version of PPT, so it might not work for you, but it would be a great place to start.
You might consider trying the Add-in which can be found here:
http://skp.mvps.org/updtlinks.htm
I have monthly report data in separate tabs, Jan to Dec.
I took the data from Jan and linked it to a powerpoint page in order to display it for briefings. I have the layout set exactly how I want it, so I copied the slide and then wanted to edit the new slide to use the data from Feb instead of Jan, however I can't seem to update the links so they use the other sheet. It just asks me to select a new file.
The links option allows me to select a new spreadsheet file but not the same file and different sheet. Is there anyway around this?
The data embedded in the ppt is both cell data & charts.
Hopefully, I've explained what I mean well enough.
Many thanks for any help and advice. =)
Your subject mentions links but later you say "The data embedded in the ppt ..."
Linked and embedded objects are two different things with different behaviors.
If you want different slides to point to different parts of your worksheet/workbook and to update at need, you'll want to do this for each slide:
Select the data in Excel
Copy it
Switch to PowerPoint, move to the slide where you want to display the data
Choose Paste Special, then choose to Link
You could, in theory, accomplish something similar by creating one link, then copying the slide and finally editing the link target, but that'd take either an add-in or some coding, and would in any case probably be more trouble than it'd be worth.
Create a tab in the file and name it "Current" or something to that effect.
Link it to the month tab you want, like Jan.
Create the link in powerpoint how ever you have already, to this tab and not the Jan tab.
you can change the links in the tab "Current" to point to a different tab, like Mar.
Update you powerpoint by either up dating links (for pastespecial as link ) or just double click the embedded object in powerpoint while the Excel file is already open