ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Converting Excel range to JPG, BMP or PDF (https://www.excelbanter.com/excel-programming/326719-converting-excel-range-jpg-bmp-pdf.html)

D[_9_]

Converting Excel range to JPG, BMP or PDF
 
Hello there,
I've created an excel application to do some specific task.
Now I need to convert certain range in my spreadsheet to JPG, BMP.
I'd would prefer to do this in my Excel macro rather than doing print screen
and
messing around some graphical editor.

One option would be to set print area and print it out to PDF. Is there
something similar for JPG/BMP.

Any ideas?

Thanks
Dusan



Fredrik Wahlgren

Converting Excel range to JPG, BMP or PDF
 

"D" wrote in message
...
Hello there,
I've created an excel application to do some specific task.
Now I need to convert certain range in my spreadsheet to JPG, BMP.
I'd would prefer to do this in my Excel macro rather than doing print

screen
and
messing around some graphical editor.

One option would be to set print area and print it out to PDF. Is there
something similar for JPG/BMP.

Any ideas?

Thanks
Dusan



Yes, you can use the Camera to do this. Here's a link that should get you
started:
http://exceltips.vitalnews.com/Pages...ra_in_VBA.html

/Fredrik




Tom Ogilvy

Converting Excel range to JPG, BMP or PDF
 
using

Range("Something").CopyPicture
ActiveSheet.PasteSpecial

will get a picture of a range on the worksheet alright, but not sure that is
what you asked for.

Since excel doesn't have a method to export a range as a gif or jpg file per
se; but can export a chart as a picture, you can use this trick of Harald
Staff's:

http://www.mvps.org/dmcritchie/excel/xl2gif.htm

--
Regards,
Tom Ogilvy


"Fredrik Wahlgren" wrote in message
...

"D" wrote in message
...
Hello there,
I've created an excel application to do some specific task.
Now I need to convert certain range in my spreadsheet to JPG, BMP.
I'd would prefer to do this in my Excel macro rather than doing print

screen
and
messing around some graphical editor.

One option would be to set print area and print it out to PDF. Is there
something similar for JPG/BMP.

Any ideas?

Thanks
Dusan



Yes, you can use the Camera to do this. Here's a link that should get you
started:
http://exceltips.vitalnews.com/Pages...ra_in_VBA.html

/Fredrik






NickHK

Converting Excel range to JPG, BMP or PDF
 
Dusan,
Just an idea:
When you copy/paste range as picture, Excel creates a temporary file called
something like "msoCA11.emf".
You could copy that file somewhere else and use/convert it.
However, given that the file name is not set, you would need some way to
check which file refers to your range.

NickHK

"D" wrote in message
...
Hello there,
I've created an excel application to do some specific task.
Now I need to convert certain range in my spreadsheet to JPG, BMP.
I'd would prefer to do this in my Excel macro rather than doing print

screen
and
messing around some graphical editor.

One option would be to set print area and print it out to PDF. Is there
something similar for JPG/BMP.

Any ideas?

Thanks
Dusan






All times are GMT +1. The time now is 06:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com