|
@@ -47,16 +47,17 @@ func ImportCompany() {
|
|
rows := sheet.MaxRow
|
|
rows := sheet.MaxRow
|
|
for i := 0; i < rows; i++ {
|
|
for i := 0; i < rows; i++ {
|
|
if i > 2 {
|
|
if i > 2 {
|
|
- row, _ := sheet.Row(i)
|
|
|
|
- realName := row.GetCell(1).String()
|
|
|
|
|
|
+ row := sheet.Row(i)
|
|
|
|
+ cells := row.Cells
|
|
|
|
+ realName := cells[1].String()
|
|
realName = strings.Trim(realName, " ")
|
|
realName = strings.Trim(realName, " ")
|
|
realName = strings.Replace(realName, " ", "", -1)
|
|
realName = strings.Replace(realName, " ", "", -1)
|
|
|
|
|
|
- mobile := row.GetCell(2).String()
|
|
|
|
|
|
+ mobile := cells[2].String()
|
|
mobile = strings.Trim(mobile, " ")
|
|
mobile = strings.Trim(mobile, " ")
|
|
mobile = strings.Replace(mobile, " ", "", -1)
|
|
mobile = strings.Replace(mobile, " ", "", -1)
|
|
fmt.Println(mobile)
|
|
fmt.Println(mobile)
|
|
- companyName := row.GetCell(6).String()
|
|
|
|
|
|
+ companyName := cells[6].String()
|
|
fmt.Println(companyName)
|
|
fmt.Println(companyName)
|
|
companyName = strings.Trim(companyName, " ")
|
|
companyName = strings.Trim(companyName, " ")
|
|
companyName = strings.Replace(companyName, " ", "", -1)
|
|
companyName = strings.Replace(companyName, " ", "", -1)
|
|
@@ -160,16 +161,17 @@ func ImportCompanyUsers() {
|
|
rows := sheet.MaxRow
|
|
rows := sheet.MaxRow
|
|
for i := 0; i < rows; i++ {
|
|
for i := 0; i < rows; i++ {
|
|
if i > 2 {
|
|
if i > 2 {
|
|
- row, _ := sheet.Row(i)
|
|
|
|
- realName := row.GetCell(1).String()
|
|
|
|
|
|
+ row := sheet.Row(i)
|
|
|
|
+ cells := row.Cells
|
|
|
|
+ realName := cells[1].String()
|
|
realName = strings.Trim(realName, " ")
|
|
realName = strings.Trim(realName, " ")
|
|
realName = strings.Replace(realName, " ", "", -1)
|
|
realName = strings.Replace(realName, " ", "", -1)
|
|
|
|
|
|
- mobile := row.GetCell(2).String()
|
|
|
|
|
|
+ mobile := cells[2].String()
|
|
mobile = strings.Trim(mobile, " ")
|
|
mobile = strings.Trim(mobile, " ")
|
|
mobile = strings.Replace(mobile, " ", "", -1)
|
|
mobile = strings.Replace(mobile, " ", "", -1)
|
|
|
|
|
|
- email := row.GetCell(5).String()
|
|
|
|
|
|
+ email := cells[5].String()
|
|
email = strings.Trim(email, " ")
|
|
email = strings.Trim(email, " ")
|
|
email = strings.Replace(email, " ", "", -1)
|
|
email = strings.Replace(email, " ", "", -1)
|
|
fmt.Println(mobile)
|
|
fmt.Println(mobile)
|
|
@@ -220,16 +222,17 @@ func ImportCompanyCreditCode() {
|
|
rows := sheet.MaxRow
|
|
rows := sheet.MaxRow
|
|
for i := 0; i < rows; i++ {
|
|
for i := 0; i < rows; i++ {
|
|
if i > 2 {
|
|
if i > 2 {
|
|
- row, _ := sheet.Row(i)
|
|
|
|
- companyName := row.GetCell(0).String()
|
|
|
|
|
|
+ row := sheet.Row(i)
|
|
|
|
+ cells := row.Cells
|
|
|
|
+ companyName := cells[0].String()
|
|
companyName = strings.Trim(companyName, " ")
|
|
companyName = strings.Trim(companyName, " ")
|
|
companyName = strings.Replace(companyName, " ", "", -1)
|
|
companyName = strings.Replace(companyName, " ", "", -1)
|
|
|
|
|
|
- creditCode := row.GetCell(4).String()
|
|
|
|
|
|
+ creditCode := cells[4].String()
|
|
creditCode = strings.Trim(creditCode, " ")
|
|
creditCode = strings.Trim(creditCode, " ")
|
|
creditCode = strings.Replace(creditCode, " ", "", -1)
|
|
creditCode = strings.Replace(creditCode, " ", "", -1)
|
|
|
|
|
|
- industryName := row.GetCell(5).String()
|
|
|
|
|
|
+ industryName := cells[5].String()
|
|
industryName = strings.Trim(industryName, " ")
|
|
industryName = strings.Trim(industryName, " ")
|
|
industryName = strings.Replace(industryName, " ", "", -1)
|
|
industryName = strings.Replace(industryName, " ", "", -1)
|
|
|
|
|