From 7d9b9275bd14556bfcaab7f1d3690b1e54ab75e8 Mon Sep 17 00:00:00 2001 From: xuri Date: Thu, 26 Aug 2021 00:48:18 +0800 Subject: This closes #1012, support specify the formula in the data validation range, and update the documentation for the `AddPicture` --- picture.go | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'picture.go') diff --git a/picture.go b/picture.go index e3601dd..5f3a375 100644 --- a/picture.go +++ b/picture.go @@ -76,14 +76,42 @@ func parseFormatPictureSet(formatSet string) (*formatPicture, error) { // } // } // -// LinkType defines two types of hyperlink "External" for web site or -// "Location" for moving to one of cell in this workbook. When the -// "hyperlink_type" is "Location", coordinates need to start with "#". +// The optional parameter "autofit" specifies if make image size auto fits the +// cell, the default value of that is 'false'. +// +// The optional parameter "hyperlink" specifies the hyperlink of the image. +// +// The optional parameter "hyperlink_type" defines two types of +// hyperlink "External" for website or "Location" for moving to one of the +// cells in this workbook. When the "hyperlink_type" is "Location", +// coordinates need to start with "#". +// +// The optional parameter "positioning" defines two types of the position of a +// image in an Excel spreadsheet, "oneCell" (Move but don't size with +// cells) or "absolute" (Don't move or size with cells). If you don't set this +// parameter, the default positioning is move and size with cells. +// +// The optional parameter "print_obj" indicates whether the image is printed +// when the worksheet is printed, the default value of that is 'true'. +// +// The optional parameter "lock_aspect_ratio" indicates whether lock aspect +// ratio for the image, the default value of that is 'false'. +// +// The optional parameter "locked" indicates whether lock the image. Locking +// an object has no effect unless the sheet is protected. +// +// The optional parameter "x_offset" specifies the horizontal offset of the +// image with the cell, the default value of that is 0. +// +// The optional parameter "x_scale" specifies the horizontal scale of images, +// the default value of that is 1.0 which presents 100%. +// +// The optional parameter "y_offset" specifies the vertical offset of the +// image with the cell, the default value of that is 0. +// +// The optional parameter "y_scale" specifies the vertical scale of images, +// the default value of that is 1.0 which presents 100%. // -// Positioning defines two types of the position of a picture in an Excel -// spreadsheet, "oneCell" (Move but don't size with cells) or "absolute" -// (Don't move or size with cells). If you don't set this parameter, default -// positioning is move and size with cells. func (f *File) AddPicture(sheet, cell, picture, format string) error { var err error // Check picture exists first. -- cgit v1.2.1