func (e *Goexcel) CopyStyle(oldkey string, newkey string) { sold := e.Style[oldkey] if sold.Font.Name == "" { panic("Style " + oldkey + " not found or Font Name not defined") } style := new(xlsx.Style) style.Alignment = sold.Alignment style.ApplyAlignment = sold.ApplyAlignment style.ApplyBorder = sold.ApplyBorder style.ApplyFill = sold.ApplyFill style.ApplyFont = sold.ApplyFont style.Border = sold.Border style.Fill = sold.Fill style.Font = sold.Font e.Style[newkey] = style }