question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Q: Save image to styleFrame?

See original GitHub issue

Hi,

I’m using StyleFrame for some time now and it’s been of great help to me. Now I run into slightly different aim, I need to insert image to dataFrame cell and save it. I managed to do that with pandas and “xlsxwriter” with a simple code as bellow, but I cannot figure how to do that with styleFrame Anyone can help?

file_logo_img = "logo.png"
writer = pd.ExcelWriter(folder_test + "img_test.xlsx", engine="xlsxwriter")
df.to_excel(writer, index=False, header=None, sheet_name="Test")
worksheet = writer.sheets["Test"]
worksheet.insert_image(1, 4, file_logo_img)
writer.save()

Im using: Styleframe 4.0.0 XlsxWritter 3.0.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mitcharkacommented, Mar 9, 2022

Thank you 😃

0reactions
DeepSpace2commented, Mar 9, 2022

This gets a bit out of scope of StyleFrame, but I believe you should be able to set img.height and img.width:

...
worksheet = writer.sheets["Test"]
img = openpyxl.drawing.image.Image('logo.png')
img.height = 23
img.width = 23
worksheet.add_image(img, anchor='D1')
writer.save()
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to save an image in Android Q using MediaStore?
Try the next method. Android Q (and above) already takes care of creating the folders if they don't exist. The example is hard-coded...
Read more >
Letter q alphabet with vintage style frame Vector Image
letter Q of the alphabet with vintage style frame vector illustration design. Download a free preview or high-quality Adobe Illustrator (ai), EPS, ...
Read more >
64 ideas de Styleframe | disenos de unas, diseño grafico, gráfico
14-oct-2019 - Explora el tablero "Styleframe" de Ivan Miguel, que 131 personas ... Art Fox, Design Boards, Image Types, Illustration, Scrap, Frames, Design....
Read more >
Gear Head 8.5-inch Digital Photo Frame (Black Wood Style ...
Digital Photo Frame 8.5 inch LCD w/ Black Wood Frame by Gear Head. Slideshow Photo viewing, computer free image viewing, USB 2.0 Card...
Read more >
Auto Shelter Peak Style Frame Cover - Camping World
Auto Shelter Peak Style Frame Cover image number 1. Auto Shelter Peak Style Frame Cover image number 2 ... Save up to $280.00...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found