From 4a9b39afc634a2399c4729f4fb47c9f290ab1ee5 Mon Sep 17 00:00:00 2001 From: Ri Xu Date: Thu, 19 Jan 2017 14:05:32 +0800 Subject: - Add hyperlink and set formula support for cell support; - Character limits for cells added; - Update go test and fix typo --- excelize.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'excelize.go') diff --git a/excelize.go b/excelize.go index fed9613..d43f123 100644 --- a/excelize.go +++ b/excelize.go @@ -85,9 +85,13 @@ func (f *File) SetCellInt(sheet string, axis string, value int) { f.saveFileList(name, replaceWorkSheetsRelationshipsNameSpace(string(output))) } -// SetCellStr provides function to set string type value of a cell. +// SetCellStr provides function to set string type value of a cell. Total number +// of characters that a cell can contain 32767 characters. func (f *File) SetCellStr(sheet string, axis string, value string) { axis = strings.ToUpper(axis) + if len(value) > 32767 { + value = value[0:32767] + } var xlsx xlsxWorksheet col := string(strings.Map(letterOnlyMapF, axis)) row, _ := strconv.Atoi(strings.Map(intOnlyMapF, axis)) -- cgit v1.2.1