I have a problem that I cannot figure out how to solve. I have an excel file containing some charts and I have PowerPoint file. All of them are located in the network and not physically on my PC.
There is a UI where users can select what they need and then through the code behind the PowerPoint gets populated automatically with the charts and data contained in the excel file.
There are about 30 pages in the PowerPoint and in only 2 of them the X axis of the charts disappear and cannot figure out why:
I recreated the charts and the sheets entirely that contained those charts
tried to work on the size of the charts at excel file level and by setting the X axes "below" the plot
I clicked on the locked ratio option of every chart in Excel and updated the links again.
The PowerPoint template file gets updated correctly but when a user run a query and then the powerpoint is generated on the basis of the template, the resulting powerpoint has these 5 charts but without X axis.
Please let me know if someone has ever faced this kind of bug/problem.
Thanks
Related
I have a ppt with 80+ charts in 50+ slides.
When I get the data, I've to go into each chart -> right click -> Edit data -> Update the data in the embedded excel.
This process I'm repeating 80+ times for each chart which is time consuming.
I'm aware that the ppt can be transformed into a complete excel pack where we can have all the data in one single sheet and link to multiple charts in different tabs.
But, Is there a possibility in ppt itself to keep all the data in one embedded excel and refer it to all the 80+ charts?
Really appreciate any help on this!!
Please let me know if you have any questions..
Thanks..
I have used Excel VBA to update chart data in powerpoint. However, though the chart data gets updated, I have to manually go to each graph and right click each one of them and go to edit data. Once I open and close the data grid, the chart gets refreshed. I have used chart.refresh in my code. But, the chart still shows the old data until I manually open and close the datasheet. What am I missing?
I have 35 excel files that each have 50 charts in them (all on the same sheet). I need to copy each of the charts over to a powerpoint file, which is already made with specific formatting and labels for positioning of the charts. How would I go about writing a script that will reference all of the charts in the respective excel file and then send them to the powerpoint at specific locations and page numbers of the powerpoint, some being differently sized?
I am assuming a forloop for referencing each of the charts, then an explicit code for each chart once numbered in the forloop to resize and place at specifc locations in the powerpoint.
Once I get an idea of how to reference each of the charts, resize and then place at specific point in the ppt slide, I can automate the entire thing.
Please note that StackOverflow is not a coding service. Bearing that in mind this is how I would go about it:
1. Put placeholders in the PowerPoint. These placeholders contain a unique identifier of each chart object (e.g. Workbook1.Sheet1.Chart1). I would make sure they are sized as your chart would be in the end (width & height) and that they are invisible. I would use rectangles with 100% transparency, and use the Alt Text property.
2. Write a sub that deletes all charts but keeps all placeholders in your PowerPoint file.
3. Write a function that retrieves the charts per placeholder.
4. Write a sub that copies the chart object and pastes it as a picture.
5. Write a sub that loops through all placeholders in your file, gets and pastes all charts.
I have a Excel file (.xlsm type) contains lot of Charts. After switch to Excel 2016, certain charts not showing Label correctly (axis-x).
Eg. It suppose showing WK10'17, WK11'17, WK12'17,...
but it showing 1,2,3,4,....
1) I tried to reselect the data, then the label showing correctly, but after save and reopen, it become 1,2,3,4.... again
2) also tried delete the existing chart, and create a new one in Excel 2010 & 2016, problem not solve.
3) Axis Type have been set as Text
Is this a bug in Excel 2016 ? Did anyone have a solution for this ?
Below Chart showing 1,2,3,4,..., which is wrong.
Below chart is showing correctly.
Below are my table look like
1st Experiment:
Firstly, I create a whole new file in Excel 2016. Then do below step:
- Create 4 Indicators for performance review, with dummy data
- Create new chart and format it
- Create simple VBA code to hide everything, and only show related Indicator that selected
Everything work just fine, even switching around the indicator many times.
Later, Close it and reopen, 3 out of 4 charts having Axis-x label became 1,2,3,...
2nd Experiment:
I created Whole new file in Excel 2010, with 4 indicators and same VBA code.
Then Close and reopen, Axis-x format remain Perfectly good.
Transfer the file into Excel 2016 machine. Close and reopen, the Axis-x became 1,2,3....
*** Current Excel Version 1705 (Build 8201.2075)
*** Attach with these experiment files
4Q Demo.zip
Appreciate, who got interested into this issue, have a look on my file.
Share with me, if you do have any solution for that. Thanks
I found out as long as the Chart is not hide, then the axis-x will remain correctly. But this do not really help, when hiding additional chart is a must.
Another temporary workaround method is :
1) moving the data table to another worksheet.
2) Then the set the Chart's data range to another worksheet (Cannot be the same worksheet with Chart).
That will work perfectly, now can hide the chart while maintain axis-x correctly.
**** Only drawback, table have to move or duplicate into another worksheet
**** Probably Microsoft will solve this after Version 1705 (Build 8201.2075)
I have a template in excel, and a powerpoint template.
in the powerpoint template I have several charts linked to the excel template.
I want to make a loop that changes something in excel, so that the chart updates, "saveas" for both the excel and powerpoint file, so I have eg. 100 different excel files and 100 different powerpoint files, all build on the templates. I want to be able to manually alter some data in those 100 excelfiles, with the link to powerpoint still intact, so they are updated too if needed.
however, when I open the powerpoint templates, right click on a chart and select "edit data", then the chart is still linked to the excel template, not the saveas version of the excel file?
how do I change the link of a chart in powerpoint, to a different excel filename? the structure in the two excel files are identical.
the chart is created in excel and copy/pasted as "keep source formatting and chain data" (translated from danish)
any help would be greatly appreciated.
I have also tried a solution where the copy/paste is done via vba into an empty powerpoint template, but that is more time consuming, and powerpoint often crashes.
Assuming you have a reference to the shape represented by the linked chart in oSh, this will show you the link:
Debug.Print oSh.LinkFormat.SourceFullName
And this will change it to some other file:
oSh.LinkFormat.SourceFullName = "c:\some\path\yourfile.xls"
Most likely there will also be a !chartname or the like after yourfile.xls ... you'll need to include that.
And save the Excel files first, THEN change the link in the PPT to point to them. If you change the link to point to a non-existent file, PPT won't throw any errors; it'll simply leave the link unchanged.