+ Reply to Thread
Results 1 to 19 of 19

export and save worksheet as a picture.

  1. #1
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    export and save worksheet as a picture.

    Hi everyone,

    Is there a way to export and save the contents and table layout of a worksheet as a picture ( say jpeg )?

    Basically what I would love to do is that when I save the workbook, a certain worksheet named " Fax " is saved to my desktop as a picture (as a snapshot). What would even be better is that the said file was named with simply the date !

    The purpose of this is so I can email it to a very non computer guy who thinks that excel is only a gum . . .

    I know this is weird but you guys are the best, you helped me a lot to make my spreadsheet.

    Thanks, Mike.

    P.S. I attached a copy of my spreadsheet
    I use office 2007.
    Attached Files Attached Files
    Last edited by Diesel13; 02-01-2010 at 03:44 PM. Reason: solved

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: export and save worksheet as a picture.

    try this code you can assign it to a button
    using some code from here adapted slightly
    http://www.xtremevbtalk.com/showthre...=574247#574247

    Please Login or Register  to view this content.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    Well, as I said in previous posts, I'm not that good at this but I try.

    Here is what I tried . . .
    Please Login or Register  to view this content.
    but I get an error

    Run-time error '1004'
    invalid parameter

    in this line

    Please Login or Register  to view this content.
    stuck, help ?

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: export and save worksheet as a picture.

    i think its the code is diferent in 2007 grrrrrrrrrrrrrrrrrrrrrrrrrrr
    i'll pm andy pope to have a look

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: export and save worksheet as a picture.

    Not really a '07 problem. Just a case of trying to delete something that does not exist.

    When the source data is set to A1 there is not data to plot so no seriescollection.
    This revision removes all those series that exist.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    01-06-2010
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: export and save worksheet as a picture.

    I suggest something easier to help, here are the steps:
    1) Open the sheet and try to fit in the screen
    2) CTRL+Sys Rq buttons to save a picture of the screen
    3) Open paint, new file and paste (CTRL+V)
    4) Save the file as JPG, and exist
    5) Open the JPG in MS Office Picture Manager (Start, Programs, MS Office, MS Office Tools, MS Office Picture Manager)
    6) Edit picture and Crop it to the limits you need
    7) Save and exit

    mha

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: export and save worksheet as a picture.

    thanks for that andy! mha thats not what the op required anyone can copy the screen!
    diesel 3
    if you put that in the workbook module
    Please Login or Register  to view this content.
    if you're not sure where that is see link in my signature, it should auto save a copy to desktop when saved
    Last edited by martindwilson; 02-01-2010 at 05:01 AM.

  8. #8
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    Hi, cant get it to work.

    here is what I tried, exactly this code but adjusted the values for my use.

    Please Login or Register  to view this content.
    in the line . . .

    Sheets("fax").Range("A1:C29").CopyPicture Appearance:=xlScreen,

    does it have to be . . .

    Range("A1:G20")

    or do I put in the area of the page I need to be saved I.E. A1:C29 ?

  9. #9
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: export and save worksheet as a picture.

    has the " Copy Picture" menu dissapeared in 2007?

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: export and save worksheet as a picture.

    Copy As Picture is part of the Paste button on the Home tab.

    Can you clarify "cant get it to work". Do you get an error? No file?

  11. #11
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    Sorry, just not in the drop down list when I try to run the macro.

    Yes I saved, closed and reopened.

    Jut cant see it.

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,468

    Re: export and save worksheet as a picture.

    If you are using the BeforeSave event then the code should be in the Thisworkbook object.
    And you will not see it listed in the Macro dialog.

    The code will run when the event fires. To fire the event save the workbook.

    If the code does not run then maybe you have the code in a standard code module.

  13. #13
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    That was it !

    I had it in the wrong module, I put it in thisworkbook and BAM !!!!!!
    Thanks, now a little tweaking and I'll post back the results . . .

  14. #14
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: export and save worksheet as a picture.

    i just put this on an excel2007 machine and it works fine

  15. #15
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.



    Thanks guys,

    Tweaked it just a tad (to input the values I needed (the code was perfect)).

    I included in this post a copy of the saved picture ( all nice and perty )

    and a copy of my spreadsheet.

    Take a look at the calculations worksheet . . . Star-Trek LCARS theme !

    took me a little while but I believe that the eye candy factor is very well worth the effort.

    Thanks again for all your input could not have done it by myself, not this year anyway !

    Mike. (Office 2007)
    Attached Images Attached Images
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    actually I got another favor, most likely childsplay but I googled it and could not find the answer . . .

    how can I change it that when it saves the file, the date format would be " 01 February 2010 " ?

  17. #17
    Registered User
    Join Date
    01-19-2010
    Location
    Sutton, Quebec, Canada
    MS-Off Ver
    office 2007
    Posts
    37

    Re: export and save worksheet as a picture.

    Found it, this was how . . .

    "dd-Mmmm-yyyy"

    Thanks everyone for all the help again.
    Mike, (office 2007)

    what kind of key opens a banana ?

    A Monkey !!!!!!!

  18. #18
    Registered User
    Join Date
    10-22-2010
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: export and save worksheet as a picture.

    When I save the selected range as gif file, my image is align to leftmost top. How can I center the image. I have attached the image file for your reference.

    Thank you.
    Attached Images Attached Images

  19. #19
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: export and save worksheet as a picture.

    romilshah please start a new thread linking to this on if relevant

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1