Screenshot Excel Sheet

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
robs90

Screenshot Excel Sheet

27 Jun 2017, 22:52

Hi,

Is it possible to screenshot an excel sheet using AHK where not all of the sheet is visible on the screen?

Thanks,

Rob
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: Screenshot Excel Sheet

28 Jun 2017, 08:07

Worst-case scenario: you could take multiple screenshots and stitch them together using the Gdip_All library, and use Excel VBA to navigate to cells programmatically. Regarding this approach, I would be interested to know if Excel VBA can retrieve a cell's XYWH dimensions, to determine the boundary for each printscreen.

Have you tried copying and pasting into MS Paint? You could copy to the clipboard, and get the image data via the Gdip_All library perhaps.

Perhaps there is some more direct way I don't know about. Possibly using Excel VBA.

==================================================

[EDIT:]

Code: Select all

;[Gdip_All]
;GDI+ standard library 1.45 by tic - AutoHotkey Community
;https://autohotkey.com/boards/viewtopic.php?f=6&t=6517

q:: ;excel copy selection, save image as file
Clipboard := ""
SendInput ^c
ClipWait,, 1
pToken := Gdip_Startup()
pBitmap := Gdip_CreateBitmapFromClipboard()
vPath := A_Desktop "\z image " A_Now ".png"
Gdip_SaveBitmapToFile(pBitmap, vPath)
Gdip_DisposeImage(pBitmap)
Gdip_Shutdown(pToken)
Run, % vPath
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Leli196, Rohwedder and 310 guests