- Fix `completeCol()` make extra rows, relate issue #87;

- godoc updated
formula
Ri Xu 8 years ago
parent 4a74951e81
commit 961996a813
No known key found for this signature in database
GPG Key ID: BA5E5BB1C948EDF7

@ -277,13 +277,6 @@ func (f *File) RemoveCol(sheet, column string) {
// Completion column element tags of XML in a sheet.
func completeCol(xlsx *xlsxWorksheet, row, cell int) {
if len(xlsx.SheetData.Row) < cell {
for i := len(xlsx.SheetData.Row); i < cell; i++ {
xlsx.SheetData.Row = append(xlsx.SheetData.Row, xlsxRow{
R: i + 1,
})
}
}
buffer := bytes.Buffer{}
for k, v := range xlsx.SheetData.Row {
if len(v.C) < cell {

@ -1796,9 +1796,14 @@ func parseFormatStyleSet(style string) (*formatCellStyle, error) {
// 634 | ZWR
//
// Excelize support set custom number format for cell. For example, set number
// as date type in Uruguay (Spanish) format:
// as date type in Uruguay (Spanish) format for Sheet1!A6:
//
// xlsx.NewStyle(`{"custom_number_format": "[$-380A]dddd\\,\\ dd\" de \"mmmm\" de \"yyyy;@"}`)
// xlsx := excelize.NewFile()
// xlsx.SetCellValue("Sheet1", "A6", 42920.5)
// style, _ := xlsx.NewStyle(`{"custom_number_format": "[$-380A]dddd\\,\\ dd\" de \"mmmm\" de \"yyyy;@"}`)
// xlsx.SetCellStyle("Sheet1", "A6", "A6", style)
//
// Cell Sheet1!A6 in the Excel Application: martes, 04 de Julio de 2017
//
func (f *File) NewStyle(style string) (int, error) {
var cellXfsID int

Loading…
Cancel
Save