Python XLWT - Insert Image aligned to top-right corner of cell -


given image width of multiple columns, want insert such right aligned specific column. know can insert image aligned top left corner via following line:

sheet.insert_bitmap(filepath_to_bmp, row, col) 

i see there 4 optional values afterwards, x, y, scale_x, , scale_y.

if can't align top-right corner, size of columns fixed, , if offsets top-left corner, answer question, if top-right-corner alignment isn't possible.

alignment top right corner isn't supported. workaround can offset top left. like:

x = column_width - image_width  sheet.insert_bitmap(filepath_to_bmp, row, col, x) 

all dimensions should in pixels.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -