csvxl

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2025 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const (
	UTF8 = "utf-8"
	Big5 = "big5"
)

CsvEncoding Options

Variables

This section is empty.

Functions

func AppendCsvToExcel

func AppendCsvToExcel(csvFiles []string, sheetNames []string, existingFile string, csvEncoding ...string)

Append CSV files to an existing Excel file, supporting custom sheet names. If the sheet name is not specified, the file name of the CSV file will be used. If the sheet is exists, it will be overwritten.

func CsvToExcel

func CsvToExcel(csvFiles []string, sheetNames []string, output string, csvEncoding ...string)

Convert multiple CSV files to an Excel file, supporting custom sheet names. If the sheet name is not specified, the file name of the CSV file will be used.

func EachCsvToOneExcel added in v0.1.0

func EachCsvToOneExcel(dir string, output string, encoding ...string)

EachCsvToOneExcel converts each CSV file in the given directory to an Excel file. The output Excel file will be saved in the given output path.

func EachExcelToCsv added in v0.1.0

func EachExcelToCsv(dir string, outputDir string)

EachExcelToCsv converts each Excel file in the given directory to CSV files. The output CSV files will be saved in the given output directory. The CSV files will be named as the Excel file name plus the sheet name plus ".csv", for example, "ExcelFileName_SheetName.csv".

func ExcelToCsv

func ExcelToCsv(excelFile string, outputDir string, csvNames []string, onlyContainSheets ...string)

ExcelToCsv splits an Excel file into multiple CSV files, one per sheet. If customNames is provided, it uses them as CSV filenames; otherwise, it uses the sheet names.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL