Excelize 开发者指南
/
func (f *File) SetColWidth(sheet, startcol, endcol string, width float64) error
根据给定的工作表名称(大小写敏感)、列范围和宽度值设置单个或多个列的宽度。例如设置名为 Sheet1
工作表上 A
到 H
列的宽度为 20
:
f := excelize.NewFile()
err := f.SetColWidth("Sheet1", "A", "H", 20)
本文章首发在 LearnKu.com 网站上。
推荐文章: