Image of chart created after publishing sheet

martin_j_king

New Member
Joined
Jan 28, 2011
Messages
20
Hi,

Having a mjor issue with an excel workbook. I have a sheet with a table of sales data and a graph.
This sheet is to be autopublished to a webpage everytime the document is saved. this bit works great, saves the page and accessible on the network

Problem is, Excel imbeds a bitmap of the chart, over the top of the chart, named Picture X eveytime, sometimes at random, and numerous times. after a couple of days there can be hundreds of pictures and you can't open the file; it hits over 1m kb of memory trying to render all these images.

Has anyone come across this before; I'm a complete novice to auto publish feature so maybe the simplest setting somewhere like creat image of chart

Any help would be great

thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
As long as the image file name does not change you could use this macro to delete the image every time the workbook is closed.

open the VB Editor - ThisWorkbook object - view code

add following the code:

Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Kill "C:\location\image.bmp"
End Sub

Cange location and image.bmp to the location and file you wish to remove.

Save the workbook before testing the macro
 
Upvote 0
unfortunately its name changes, normally picture X in sequential order or just chart x.
I have a macro that deletes all items but unfortunately deletes the chart;

Sub DeletePics()
Sheets("4.Wiki").Select
ActiveSheet.Shapes.SelectAll
Selection.Delete
End Sub

Any ideas how I can select pictures only and not charts? or Cut the chart and paste to another sheet, then I could delete all images, then paste this chart back

actually, I'm going to try that now, should be ok with that code

thanks for the suggestion of the workbook close though
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,719
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top