Skip to content

This content is for v4.x version. Switch to the Stable version.

Picture

Details about adding and manipulating picture to a worksheet

use draviavemal_openxml_office::spreadsheet_2007::models::ExcelPictureSetting;
let mut sheet = excel
.get_worksheet_mut("image".to_string())
.expect("Failed to get sheet");
sheet
.add_picture("./tom_and_jerry.jpg", ExcelPictureSetting::default())
.expect("Failed to add image");
sheet.flush().expect("Failed to save sheet");
PropertyTypeDetails
hyperlinkPropertiesHyperlinkPropertiesAttach hyperlink to the image
imageTypeImageTypeImage extension type
anchorEditTypeAnchorEditTypeMode of picture starting point
fromAnchorPositionTop Left coordinate
toAnchorPositionBottom right X coordinate
PropertyTypeDetails
columnuint
columnOffsetuint
rowuint
rowOffsetuint