set document properties
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/iancoleman/orderedmap"
|
||||
@@ -92,6 +93,15 @@ func main() {
|
||||
fmt.Printf("Error setting sheet name to '%s': %s\n", worksheetName, err)
|
||||
}
|
||||
}
|
||||
|
||||
// Set the document properties
|
||||
err := xlsx.SetDocProps(&excelize.DocProperties{
|
||||
Creator: "json2excel",
|
||||
Created: time.Now().Format(time.RFC3339),
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Printf("Error setting document properties: %s\n", err)
|
||||
}
|
||||
}
|
||||
|
||||
// Read the json input file
|
||||
|
Reference in New Issue
Block a user