Python Forum
is it possible to copy image from email and place into excel file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is it possible to copy image from email and place into excel file?
#1
So we have a daily email from 3rd party that has a statistics graph embedded in the body of the mail we receive. We have a daily dashboard that we display around the office with this chart/graph and right now we manually copy from the email, paste it into the excel file, resize a little to fit within a given frame size so it displays completely on the screens around the office..

Id like to see if its possible to handle this manual task using python... I already use python to download attachments from my outlook and update spreadsheets with that data, just curious if its possible to do this with python.

if so what should i consider or look up in order to grab the image/screenshot from a given email and paste into a specific area in the excel file.
Reply
#2
(Nov-29-2022, 04:03 PM)cubangt Wrote: if so what should i consider or look up in order to grab the image/screenshot from a given email and paste into a specific area in the excel file.
Could use Selenium to take screenshot and can also drop Excel and use Colab give all the url as i do now.
Example take screenshot of your post, and Notebook to display the image.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument("--headless")
options.add_argument("window-size=800,550")
browser = webdriver.Chrome(executable_path=r'C:\cmder\bin\chromedriver.exe', options=options)
browser.get('https://python-forum.io/thread-38834.html')
browser.save_screenshot("image.png")
browser.close()
carecavoador likes this post
Reply
#3
How would that work if the screenshot / image i need to get is in an outlook email we receive daily.
I thought selenium was only for web page/content online?
Reply
#4
(Nov-30-2022, 04:06 PM)cubangt Wrote: How would that work if the screenshot / image i need to get is in an outlook email we receive daily.
I thought selenium was only for web page/content online?
Yes,for outlook have to look at something like extract-msg, independentsoft.msg.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 249 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Python openyxl not updating Excel file MrBean12 1 315 Mar-03-2024, 12:16 AM
Last Post: MrBean12
  Copy Paste excel files based on the first letters of the file name Viento 2 423 Feb-07-2024, 12:24 PM
Last Post: Viento
  Search Excel File with a list of values huzzug 4 1,216 Nov-03-2023, 05:35 PM
Last Post: huzzug
  Updating sharepoint excel file odd results cubangt 1 821 Nov-03-2023, 05:13 PM
Last Post: noisefloor
  error "cannot identify image file" part way through running hatflyer 0 666 Nov-02-2023, 11:45 PM
Last Post: hatflyer
  place 2 windows exactly above each other janeik 3 924 Jul-23-2023, 03:12 AM
Last Post: deanhystad
  Save image from outlook email cubangt 1 691 Jun-07-2023, 06:52 PM
Last Post: cubangt
  Copy data from Excel and paste into Discord (Midjourney) Joe_Wright 4 2,034 Jun-06-2023, 05:49 PM
Last Post: rajeshgk
  Reading data from excel file –> process it >>then write to another excel output file Jennifer_Jone 0 1,089 Mar-14-2023, 07:59 PM
Last Post: Jennifer_Jone

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020