From 555e2ba9a82d6974077681c7ab34ce0fa93d351d Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Tue, 27 Jun 2017 17:53:06 +0800 Subject: - Make function `TitleToNumber()` exportable, note that function `ToAlphaString()` return value calculation changes, get more info from go doc. Relate issue #63; - Readme and go doc updated --- picture.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'picture.go') diff --git a/picture.go b/picture.go index a61c1e2..da9bb4e 100644 --- a/picture.go +++ b/picture.go @@ -174,7 +174,7 @@ func (f *File) addDrawingPicture(sheet, drawingXML, cell, file string, width, he fromCol := string(strings.Map(letterOnlyMapF, cell)) fromRow, _ := strconv.Atoi(strings.Map(intOnlyMapF, cell)) row := fromRow - 1 - col := titleToNumber(fromCol) + col := TitleToNumber(fromCol) width = int(float64(width) * formatSet.XScale) height = int(float64(height) * formatSet.YScale) colStart, rowStart, _, _, colEnd, rowEnd, x2, y2 := f.positionObjectPixels(sheet, col, row, formatSet.OffsetX, formatSet.OffsetY, width, height) @@ -391,7 +391,7 @@ func (f *File) GetPicture(sheet, cell string) (string, []byte) { fromCol := string(strings.Map(letterOnlyMapF, cell)) fromRow, _ := strconv.Atoi(strings.Map(intOnlyMapF, cell)) row := fromRow - 1 - col := titleToNumber(fromCol) + col := TitleToNumber(fromCol) drawingRelationships := strings.Replace(strings.Replace(target, "../drawings", "xl/drawings/_rels", -1), ".xml", ".xml.rels", -1) -- cgit v1.2.1