Код: Выделить всё
import win32com.client as win32
excel = win32.gencache.EnsureDispatch("Excel.Application")
wb = excel.Workbooks.Open("")
r = wb.Sheets("").Range("A1:J50")
# Here A1:J50 is the area over which cart is
r.CopyPicture()
< /code>
Здесь я застрял. Мне нужно сейчас скопировать выбранный диапазон в файл. Любая помощь или указатели на DOC могут мне очень помочь. Br />Sub Export_Range_Images()
' =========================================
' Code to save selected Excel Range as Image
' =========================================
Dim oRange As Range
Dim oCht As Chart
Dim oImg As Picture
Set oRange = Range("A1:B2")
Set oCht = Charts.Add
oRange.CopyPicture xlScreen, xlPicture
oCht.Paste
oCht.Export FileName:="C:\temp\SavedRange.jpg", Filtername:="JPG"
End Sub
Подробнее здесь: https://stackoverflow.com/questions/111 ... ing-python