From bfe2ec5b181a779a0e271e89da06676545984ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Fri, 19 Nov 2021 17:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E5=88=92=E6=96=87=E4=BB=B6=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E6=94=AF=E6=8C=81=E7=9A=84=E7=B1=BB=E5=9E=8B,=20TODO:?= =?UTF-8?q?=20=E5=85=B7=E4=BD=93=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- excel/convert.go | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 excel/convert.go diff --git a/excel/convert.go b/excel/convert.go new file mode 100644 index 0000000..28f4288 --- /dev/null +++ b/excel/convert.go @@ -0,0 +1,60 @@ +// Package excel... +// +// Description : 文件类型转换 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2021-11-19 5:42 下午 +package excel + +// NewConvert 获取读取实例 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 5:45 下午 2021/11/19 +func NewConvert(fullFilePath string, filePassword string) (*Convert, error) { + var ( + err error + read *Read + ) + if read, err = NewRead(fullFilePath, filePassword); nil != err { + return nil, err + } + return &Convert{read: read}, nil +} + +// Convert 格式状态 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 5:45 下午 2021/11/19 +type Convert struct { + read *Read +} + +// ToCSV 转换为CSV +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 5:46 下午 2021/11/19 +func (c *Convert) ToCSV() { + +} + +// ToJSON 转换为JSON +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 5:46 下午 2021/11/19 +func (c *Convert) ToJSON() { + +} + +// ToTXT 转换为txt +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 5:47 下午 2021/11/19 +func (c *Convert) ToTXT(splitChar string) { + +}