CSV File Structure Explained
This guide is for users who want to manually create or edit a CSV file for import. Understanding the format ensures your data is imported correctly.
When you export data from the app, the resulting CSV file will have the following columns. For a successful import, your CSV file must also contain these columns, especially amount
, bill_time
, and bill_type
.
Column Details
Column Name | Required for Import? | Description | Example |
---|---|---|---|
id | Recommended | A unique identifier for the bill (UUID format). If you’re creating new bills, you can leave this empty, and the app will generate one. If provided, it’s used to prevent duplicates. | 123e4567-e89b-12d3-a456-426614174000 |
amount | Yes | The transaction amount. A positive number. | 85.50 |
category | Recommended | The name of the category for this bill (e.g., “Dining,” “Salary”). If this category doesn’t exist, the app will create it for you during import. | Dining |
remark | No | Any personal notes or comments about the bill. | Dinner with friends |
bill_time | Yes | The date and time of the transaction in ISO 8601 format. This is a universal standard to ensure time zones are handled correctly. | 2024-01-15T19:30:00Z |
bill_type | Yes | The type of transaction. Must be either “Expense” or “Income” (or the equivalent in the language you are using, e.g., “支出” or “收入” for Chinese). | Expense |
categoryId | No | The unique ID of the category. This is mainly used by the app for perfect matching. You can usually leave this empty when creating a file manually. | cat123 |
category_translation_key | No | A system key for default categories (e.g., ‘category.dining’). This helps the app identify standard categories across different languages. You can leave this empty. | category.dining |
Example CSV Content
id,amount,category,remark,bill_time,bill_type,categoryId,category_translation_key
123e4567-e89b-12d3-a456-426614174000,85.5,Dining,Dinner with friends,2024-01-15T19:30:00Z,Expense,cat123,category.dining
234e5678-e89b-12d3-a456-426614174001,5000,Salary,Monthly paycheck,2024-01-01T10:00:00Z,Income,cat456,category.salary
Tips for Manual Editing
- Use a Proper Editor: It’s best to use spreadsheet software like Google Sheets, Microsoft Excel, or Apple Numbers. If you use a plain text editor, be careful not to corrupt the comma-separated structure.
- Date Format is Crucial: The
bill_time
must be in theYYYY-MM-DDTHH:MM:SSZ
format. Most spreadsheet programs can be configured to export dates in this format. - Bill Type: Ensure the
bill_type
value exactly matches “Expense” or “Income” (case-sensitive, in English if your app is in English).