bronze1man 12 years ago
parent
commit
2af8a75324
2 changed files with 4 additions and 4 deletions
  1. 3 3
      macExcel_test.go
  2. 1 1
      workbook.go

+ 3 - 3
macExcel_test.go

@@ -14,9 +14,9 @@ func TestMacExcel(t *testing.T) {
 		t.Error("OpenFile returned nil FileInterface without generating an os.Error")
 		return
 	}
-	s:=xlsxFile.Sheets[0].Cell(0,0).String()
-	if s!="编号"{
-		t.Errorf("[TestMacExcel] xlsxFile.Sheets[0].Cell(0,0).String():'%s'",s)
+	s := xlsxFile.Sheets[0].Cell(0, 0).String()
+	if s != "编号" {
+		t.Errorf("[TestMacExcel] xlsxFile.Sheets[0].Cell(0,0).String():'%s'", s)
 		return
 	}
 }

+ 1 - 1
workbook.go

@@ -125,7 +125,7 @@ func getWorksheetFromSheet(sheet xlsxSheet, worksheets map[string]*zip.File) (*x
 		// this work around will open it
 		for sheetName, f = range worksheets {
 			//do not want "_rels/sheet1.xml."
-			if strings.Contains(sheetName,"_"){
+			if strings.Contains(sheetName, "_") {
 				continue
 			}
 			break