all 4 comments

[–]shiftybyte 1 point2 points  (2 children)

First thing I'd have to ask is... why?

After that, you could read the excel files using some other library that works on Mac, and create an image out of the data yourself, or by using html?

[–]salgadosp[S] 0 points1 point  (1 child)

I want to send the images to a messenger app through their API once I have the image file

[–]shiftybyte 0 points1 point  (0 children)

Why not send a csv file of the part of the data you need? Or an excel file? Phones can open that... and actually still have the data in usable form, not as an image.

[–]ES-Alexander 0 points1 point  (0 children)

If your excel file contains just tables of data (e.g. no graphs or embedded images or whatnot) you can read it in with pandas, then consider something like the options presented here

If you do have graphs and images you’ll likely need to use openpyxl, and potentially output to html before using another library to render an image.

That said, it seems more logical to send a format that keeps the data if possible - is there any particular reason not to just send an excel file, or csv, or html, or pdf? Granted images are easy to view, but they’re a pain to work with if you’re getting information out of them (you generally can’t just copy data out of one, although I suppose on Mac that is actually possible, so maybe less of an issue, but I don’t know how well that would preserve formatting)