jmcnamara / excel-writer-xlsx

Perl module to create Excel XLSX files.
https://metacpan.org/pod/distribution/Excel-Writer-XLSX/lib/Excel/Writer/XLSX.pm
Other
100 stars 51 forks source link

insert SVG images #260

Closed kbrannen closed 3 years ago

kbrannen commented 3 years ago

It'd be really helpful if insert_image() could take SVG images and properly insert them. Probably have to use x_scale & y_scale for the desired size, or else add width & height options.

FWIW, I know Excel can take SVG or at least modern versions can, so the issue is the perl module.

I tried a quick hack on Workbook::_get_image_properties to see if I could make it work. I stopped the automatic rejection for bad type, but it failed overall as there were [obviously] other parts that needed change that I'm not aware of.

jmcnamara commented 3 years ago

I had a look at this recently for XlsxWriter here: https://github.com/jmcnamara/XlsxWriter/issues/608

I've copied the text below. It is written for Xlsxwriter, the Python version of this library, but it also applies to Excel::Writer::XLSX:

I've looked into this in a bit more detail and I don't think I can support SVG files in XlsxWriter. There are a number of technical issues that contribute to this:

So overall this is a can't fix/won't fix. Sorry.