summaryrefslogtreecommitdiff
path: root/picture.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-08-26 00:48:18 +0800
committerxuri <xuri.me@gmail.com>2021-08-26 00:48:18 +0800
commit7d9b9275bd14556bfcaab7f1d3690b1e54ab75e8 (patch)
tree97d0744f427446f6f2f5117acf943995c48b5394 /picture.go
parentcd030d4aa81582e8bc04d029c0be6e42eff9ea47 (diff)
This closes #1012, support specify the formula in the data validation range, and update the documentation for the `AddPicture`
Diffstat (limited to 'picture.go')
-rw-r--r--picture.go42
1 files changed, 35 insertions, 7 deletions
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.