support setting whether the data table in csv / xls / xlsx files contains a header row

This commit is contained in:
MaysWind
2025-08-08 20:11:31 +08:00
parent 351cebe169
commit ecf6fbd187
13 changed files with 688 additions and 105 deletions
@@ -42,7 +42,7 @@ var (
// ParseImportedData returns the imported data by parsing the firefly III transaction csv data
func (c *fireflyIIITransactionDataCsvFileImporter) ParseImportedData(ctx core.Context, user *models.User, data []byte, defaultTimezoneOffset int16, accountMap map[string]*models.Account, expenseCategoryMap map[string]map[string]*models.TransactionCategory, incomeCategoryMap map[string]map[string]*models.TransactionCategory, transferCategoryMap map[string]map[string]*models.TransactionCategory, tagMap map[string]*models.TransactionTag) (models.ImportedTransactionSlice, []*models.Account, []*models.TransactionCategory, []*models.TransactionCategory, []*models.TransactionCategory, []*models.TransactionTag, error) {
reader := bytes.NewReader(data)
dataTable, err := csv.CreateNewCsvBasicDataTable(ctx, reader)
dataTable, err := csv.CreateNewCsvBasicDataTable(ctx, reader, true)
if err != nil {
return nil, nil, nil, nil, nil, nil, err