@ -122,7 +122,7 @@ func (f *File) getCellStyle(sheet, axis string) int {
col := string ( strings . Map ( letterOnlyMapF , axis ) )
row , _ := strconv . Atoi ( strings . Map ( intOnlyMapF , axis ) )
xAxis := row - 1
yAxis := t itleToNumber( col )
yAxis := T itleToNumber( col )
rows := xAxis + 1
cell := yAxis + 1
@ -173,7 +173,7 @@ func (f *File) SetCellInt(sheet, axis string, value int) {
col := string ( strings . Map ( letterOnlyMapF , axis ) )
row , _ := strconv . Atoi ( strings . Map ( intOnlyMapF , axis ) )
xAxis := row - 1
yAxis := t itleToNumber( col )
yAxis := T itleToNumber( col )
rows := xAxis + 1
cell := yAxis + 1
@ -211,7 +211,7 @@ func (f *File) SetCellStr(sheet, axis, value string) {
col := string ( strings . Map ( letterOnlyMapF , axis ) )
row , _ := strconv . Atoi ( strings . Map ( intOnlyMapF , axis ) )
xAxis := row - 1
yAxis := t itleToNumber( col )
yAxis := T itleToNumber( col )
rows := xAxis + 1
cell := yAxis + 1
@ -242,7 +242,7 @@ func (f *File) SetCellDefault(sheet, axis, value string) {
col := string ( strings . Map ( letterOnlyMapF , axis ) )
row , _ := strconv . Atoi ( strings . Map ( intOnlyMapF , axis ) )
xAxis := row - 1
yAxis := t itleToNumber( col )
yAxis := T itleToNumber( col )
rows := xAxis + 1
cell := yAxis + 1
@ -269,7 +269,7 @@ func completeCol(xlsx *xlsxWorksheet, row, cell int) {
if len ( v . C ) < cell {
start := len ( v . C )
for iii := start ; iii < cell ; iii ++ {
buffer . WriteString ( ToAlphaString ( iii + 1 ) )
buffer . WriteString ( ToAlphaString ( iii ) )
buffer . WriteString ( strconv . Itoa ( k + 1 ) )
xlsx . SheetData . Row [ k ] . C = append ( xlsx . SheetData . Row [ k ] . C , xlsxC {
R : buffer . String ( ) ,
@ -301,7 +301,7 @@ func completeRow(xlsx *xlsxWorksheet, row, cell int) {
start := len ( xlsx . SheetData . Row [ ii ] . C )
if start == 0 {
for iii := start ; iii < cell ; iii ++ {
buffer . WriteString ( ToAlphaString ( iii + 1 ) )
buffer . WriteString ( ToAlphaString ( iii ) )
buffer . WriteString ( strconv . Itoa ( ii + 1 ) )
xlsx . SheetData . Row [ ii ] . C = append ( xlsx . SheetData . Row [ ii ] . C , xlsxC {
R : buffer . String ( ) ,
@ -383,13 +383,13 @@ func checkRow(xlsx *xlsxWorksheet) {
}
endR := string ( strings . Map ( letterOnlyMapF , v . C [ lenCol - 1 ] . R ) )
endRow , _ := strconv . Atoi ( strings . Map ( intOnlyMapF , v . C [ lenCol - 1 ] . R ) )
endCol := t itleToNumber( endR ) + 1
endCol := T itleToNumber( endR ) + 1
if lenCol < endCol {
oldRow := xlsx . SheetData . Row [ k ] . C
xlsx . SheetData . Row [ k ] . C = xlsx . SheetData . Row [ k ] . C [ : 0 ]
tmp := [ ] xlsxC { }
for i := 0 ; i <= endCol ; i ++ {
buffer . WriteString ( ToAlphaString ( i + 1 ) )
buffer . WriteString ( ToAlphaString ( i ) )
buffer . WriteString ( strconv . Itoa ( endRow ) )
tmp = append ( tmp , xlsxC {
R : buffer . String ( ) ,
@ -398,7 +398,7 @@ func checkRow(xlsx *xlsxWorksheet) {
}
xlsx . SheetData . Row [ k ] . C = tmp
for _ , y := range oldRow {
colAxis := t itleToNumber( string ( strings . Map ( letterOnlyMapF , y . R ) ) )
colAxis := T itleToNumber( string ( strings . Map ( letterOnlyMapF , y . R ) ) )
xlsx . SheetData . Row [ k ] . C [ colAxis ] = y
}
}