Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any way to save a range/selection of excel cells as a jpg or png or
any picture format. I have a graph on an excel page, and i want the jpg to also contains the information in the cells about it. I know how to save the chart by itself.... ActiveChart.Export Filename:=MyFiles.BuildPath(ScansPath, TestNumber) & " " & RunNumber & ".png", FilterName:="PNG" But have no idea how to print/export a page to a picture format. Any help at all would be great, thanks, -- Jeff "Spike" Zapinski FAS Project Engineer |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You can copy the range and paste in within the chart before exporting. Something like this ' chart data Range("B2:C6").CopyPicture xlScreen With ActiveChart .Paste .Export "C:\temp\pic1.gif", "gif" End With 'ActiveChart.Export Filename:= _ ' MyFiles.BuildPath(ScansPath, TestNumber) & " " _ ' & RunNumber & ".png", FilterName:="PNG" Cheers Andy Spike wrote: Is there any way to save a range/selection of excel cells as a jpg or png or any picture format. I have a graph on an excel page, and i want the jpg to also contains the information in the cells about it. I know how to save the chart by itself.... ActiveChart.Export Filename:=MyFiles.BuildPath(ScansPath, TestNumber) & " " & RunNumber & ".png", FilterName:="PNG" But have no idea how to print/export a page to a picture format. Any help at all would be great, thanks, -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Andy,
I hate you!! J/k. No, in all seriously though, thank you very much!! Although i dont understand why i cant print a page to a jpg real easily, the solution you have provided is one i have been searching for, well, for a long time. I cant believe i have never come across that before, or maybe i just never worded the question right before. i dont know. But thank you very very much. -- Jeff "Spike" Zapinski FAS Project Engineer "Andy Pope" wrote: Hi, You can copy the range and paste in within the chart before exporting. Something like this ' chart data Range("B2:C6").CopyPicture xlScreen With ActiveChart .Paste .Export "C:\temp\pic1.gif", "gif" End With 'ActiveChart.Export Filename:= _ ' MyFiles.BuildPath(ScansPath, TestNumber) & " " _ ' & RunNumber & ".png", FilterName:="PNG" Cheers Andy Spike wrote: Is there any way to save a range/selection of excel cells as a jpg or png or any picture format. I have a graph on an excel page, and i want the jpg to also contains the information in the cells about it. I know how to save the chart by itself.... ActiveChart.Export Filename:=MyFiles.BuildPath(ScansPath, TestNumber) & " " & RunNumber & ".png", FilterName:="PNG" But have no idea how to print/export a page to a picture format. Any help at all would be great, thanks, -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
How to diasble save and save as menu but allow a save button | Excel Programming | |||
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: | Excel Programming | |||
Why system asks me to save change even after I call save method(VB.NET) | Excel Programming |