randym / axlsx

xlsx generation with charts, images, automated column width, customizable styles and full schema validation. Axlsx excels at helping you generate beautiful Office Open XML Spreadsheet documents without having to understand the entire ECMA specification. Check out the README for some examples of how easy it is. Best of all, you can validate your xlsx file before serialization so you know for sure that anything generated is going to load on your client's machine.
MIT License
2.62k stars 697 forks source link

Unable to set width and height of added image #96

Closed rdssoni closed 12 years ago

rdssoni commented 12 years ago

I am able to add image to Excel using the following code :

ws.add_image(:image_src => '../image_path',:noSelect => true, :noMove => true) do |image| image.width=2000 image.height=200 image.start_at 0,0 end

But i am not able to set appropriate width and height of the image. Whatever width and height i give, it is not working.

randym commented 12 years ago

turns out this is an issue with Open Office.

If this is something that can be added in, Id be happy to do so but I will need some help from you in working out how Open Office handles image resizing vs the ECMA 376 spec.

randym commented 12 years ago

@rdssoni is this something you think we can resolve?

randym commented 12 years ago

As this is working under excel I am going to close this. If you are interested in helping out with Open Office, let me know. It would be interesting to see what the differences are, and if they can be overcome.