Merge pull request #9 from Luxurioust/revert-8-master

Revert "Update README.md"
This commit is contained in:
Ri Xu 2016-10-18 09:46:10 +08:00 committed by GitHub
commit ea11b50105
1 changed files with 1 additions and 8 deletions

View File

@ -30,8 +30,6 @@ package main
import ( import (
"fmt" "fmt"
"os"
"github.com/Luxurioust/excelize" "github.com/Luxurioust/excelize"
) )
@ -39,7 +37,6 @@ func main() {
xlsx, err := excelize.CreateFile() xlsx, err := excelize.CreateFile()
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1)
} }
xlsx.NewSheet(2, "Sheet2") xlsx.NewSheet(2, "Sheet2")
xlsx.NewSheet(3, "Sheet3") xlsx.NewSheet(3, "Sheet3")
@ -48,7 +45,6 @@ func main() {
err = xlsx.WriteTo("/home/Workbook.xlsx") err = xlsx.WriteTo("/home/Workbook.xlsx")
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1)
} }
} }
``` ```
@ -69,7 +65,6 @@ func main() {
xlsx, err := excelize.OpenFile("/home/Workbook.xlsx") xlsx, err := excelize.OpenFile("/home/Workbook.xlsx")
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1)
} }
xlsx.SetCellInt("Sheet2", "B2", 100) xlsx.SetCellInt("Sheet2", "B2", 100)
xlsx.SetCellStr("Sheet2", "C11", "Hello") xlsx.SetCellStr("Sheet2", "C11", "Hello")
@ -80,7 +75,6 @@ func main() {
err = xlsx.Save() err = xlsx.Save()
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1)
} }
} }
``` ```
@ -99,7 +93,6 @@ func main() {
xlsx, err := excelize.OpenFile("/home/Workbook.xlsx") xlsx, err := excelize.OpenFile("/home/Workbook.xlsx")
if err != nil { if err != nil {
fmt.Println(err) fmt.Println(err)
os.Exit(1)
} }
cell := xlsx.GetCellValue("Sheet2", "D11") cell := xlsx.GetCellValue("Sheet2", "D11")
fmt.Println(cell) fmt.Println(cell)