Skip to main content

Overview

BudgetView’s export feature allows you to download your financial data for backup, analysis, or integration with external tools. All exports include both USD and VES amounts when the BCV rate is available.
Exported data is personal and secure. Only you can access and download your information.

Accessing the Export Page

  1. Navigate to Exportar from your dashboard sidebar
  2. View the data summary cards showing record counts
  3. Configure your export options
  4. Download your file

Export Configuration

1. Choose Dataset

Select which type of data to export:

Transacciones

What’s included:
  • Transaction date
  • Type (Ingreso/Gasto)
  • Wallet name
  • Category name
  • Amount in USD
  • Amount in VES (BCV)
  • Description
Best for: Financial analysis, tax preparation, budget reviews

Billeteras

What’s included:
  • Wallet ID
  • Wallet name
Best for: Account inventory, wallet management

Categorías

What’s included:
  • Category ID
  • Category name
  • Type (Gasto/Ingreso)
Best for: Category structure backup, template creation

Presupuestos

What’s included:
  • Category name
  • Period (YYYY-MM-DD)
  • Budget limit in USD
  • Budget limit in VES (BCV)
Best for: Budget planning, spending limit reviews

Dataset Selection Code

const DATASET_OPTIONS = [
  {
    value: "transacciones",
    label: "Transacciones",
    description: "Exporta todos tus movimientos con categoría y billetera.",
    icon: CreditCard,
  },
  {
    value: "billeteras",
    label: "Billeteras",
    description: "Listado de cuentas registradas para tu usuario.",
    icon: Wallet,
  },
  {
    value: "categorias",
    label: "Categorías",
    description: "Catálogo de categorías de gastos e ingresos.",
    icon: FolderKanban,
  },
  {
    value: "presupuestos",
    label: "Presupuestos",
    description: "Metas mensuales por categoría con su límite de gasto.",
    icon: PiggyBank,
  },
] as const

2. Select Format

Choose your export file format:
Comma-Separated ValuesBest for:
  • Excel, Google Sheets
  • Data analysis tools
  • Import into accounting software
Format example:
Fecha,Tipo,Billetera,Categoría,Monto (USD),Monto (VES BCV),Descripción
2024-03-15,Gasto,Principal,Groceries,50.00,1825.00,"Weekly shopping"
2024-03-14,Ingreso,Ahorros,Salary,1000.00,36500.00,"March paycheck"
Features:
  • Proper CSV escaping for commas and quotes
  • UTF-8 encoding
  • Header row with column labels

3. Apply Filters

Refine what data to export:

Transaction-Specific Filters

1

Select Wallet

Choose which wallet’s transactions to export:
  • Todas: All wallets (default)
  • Or select a specific wallet by name
if (walletFilter !== "all") {
  query = query.eq("billetera_id", walletFilter)
}
2

Choose Date Range

Pick a custom date range using the calendar picker:Default: Last 30 daysFeatures:
  • Dual calendar view (2 months)
  • Select start and end dates
  • Visual date range preview
  • Clear button to reset
const fromIso = startOfDayIso(transactionRange?.from)
const toIso = endOfDayIso(transactionRange?.to)
if (fromIso) {
  query = query.gte("fecha_transaccion", fromIso)
}
if (toIso) {
  query = query.lte("fecha_transaccion", toIso)
}

Budget-Specific Filters

1

Select Month

Choose which month’s budgets to export:Input: Month picker (YYYY-MM format)Default: Current month
if (selectedDataset === "presupuestos") {
  if (!monthFilter) {
    setStatusVariant("error")
    setStatusMessage("Selecciona un mes para exportar tus presupuestos.")
    return
  }
  const targetPeriod = `${monthFilter}-01`
  const { data, error } = await supabase
    .from("presupuestos")
    .select("id,monto,periodo,categorias(nombre)")
    .eq("usuario_id", userId)
    .eq("periodo", targetPeriod)
}

Universal Filter: Movement Type

Available for Transactions, Wallets, and Categories:
Includes both income and expenses.No filter applied to the query.

Export Process

Step-by-Step Flow

1

User Authentication

System verifies you’re logged in:
React.useEffect(() => {
  let active = true
  const resolveUser = async () => {
    const { data, error } = await supabase.auth.getUser()
    if (!active) return
    if (error || !data.user) {
      setAuthError("Debes iniciar sesión para exportar tus datos.")
      setUserId(null)
      return
    }
    setUserId(data.user.id)
    setAuthError(null)
  }
  resolveUser()
}, [])
2

Data Fetching

Queries Supabase based on selected dataset and filters:
if (selectedDataset === "transacciones") {
  let query = supabase
    .from("transacciones")
    .select("id,monto,tipo,descripcion,fecha_transaccion,categorias(nombre),billeteras(nombre)")
    .eq("usuario_id", userId)
    .order("fecha_transaccion", { ascending: true })

  // Apply filters...
  const { data, error } = await query
  if (error) throw error
  rows = normalizeTransactions((data ?? []) as TransactionExportRow[])
}
3

Data Normalization

Transforms database records into export-friendly format:
const normalizeTransactions = React.useCallback(
  (rows: TransactionExportRow[]): NormalizedRow[] =>
    rows.map((row) => {
      const categoryRecord = Array.isArray(row.categorias) ? row.categorias[0] : row.categorias
      const walletRecord = Array.isArray(row.billeteras) ? row.billeteras[0] : row.billeteras
      const amount = Number(row.monto ?? 0)
      return {
        date: row.fecha_transaccion ? new Date(row.fecha_transaccion).toISOString() : null,
        type: row.tipo ?? "",
        wallet: walletRecord?.nombre ?? "",
        category: categoryRecord?.nombre ?? "",
        amountUsd: Number.isFinite(amount) ? Number(amount.toFixed(2)) : 0,
        amountVes: bcvRate && Number.isFinite(amount) ? Number((amount * bcvRate).toFixed(2)) : null,
        description: row.descripcion ?? "",
      }
    }),
  [bcvRate]
)
4

Format Conversion

Converts normalized data to selected format:CSV:
const toCsv = (rows: NormalizedRow[], columns: ColumnMeta[]) => {
  if (rows.length === 0) return ""
  const escapeValue = (value: string | number | null) => {
    if (value === null || value === undefined) return ""
    const stringValue = String(value)
    if (/[",\n]/.test(stringValue)) {
      return `"${stringValue.replace(/"/g, '""')}`
    }
    return stringValue
  }

  const header = columns.map((column) => column.label).join(",")
  const lines = rows.map((row) =>
    columns
      .map((column) => escapeValue(row[column.key] ?? ""))
      .join(",")
  )

  return [header, ...lines].join("\n")
}
JSON:
downloadFile(JSON.stringify(rows, null, 2), `${fileBaseName}.json`, "application/json")
PDF:
const doc = generatePdfDocument(
  rows,
  columns,
  `Exportación de ${datasetLabel}`,
  `Generado el ${format(new Date(), "dd MMM yyyy HH:mm", { locale: es })}`
)
doc.save(`${fileBaseName}.pdf`)
5

File Download

Triggers browser download:
const downloadFile = (content: string, fileName: string, mimeType: string) => {
  const blob = new Blob([content], { type: mimeType })
  const link = document.createElement("a")
  link.href = URL.createObjectURL(blob)
  link.download = fileName
  document.body.appendChild(link)
  link.click()
  document.body.removeChild(link)
  URL.revokeObjectURL(link.href)
}
File naming convention:
{dataset}-{timestamp}.{extension}

Example: transacciones-2024-03-15-14-30-25.csv

Column Definitions

Each dataset has specific columns:

Transactions Columns

transacciones: [
  { key: "date", label: "Fecha" },
  { key: "type", label: "Tipo" },
  { key: "wallet", label: "Billetera" },
  { key: "category", label: "Categoría" },
  { key: "amountUsd", label: "Monto (USD)" },
  { key: "amountVes", label: "Monto (VES BCV)" },
  { key: "description", label: "Descripción" },
]
VES amounts are calculated using the BCV rate at the time of export, not the rate when the transaction was created.

Wallets Columns

billeteras: [
  { key: "walletId", label: "ID" },
  { key: "name", label: "Nombre" },
]

Categories Columns

categorias: [
  { key: "categoryId", label: "ID" },
  { key: "name", label: "Nombre" },
  { key: "kind", label: "Tipo" },
]

Budgets Columns

presupuestos: [
  { key: "category", label: "Categoría" },
  { key: "period", label: "Periodo" },
  { key: "limitUsd", label: "Límite (USD)" },
  { key: "limitVes", label: "Límite (VES BCV)" },
]

Data Summary Cards

The export page shows live counts for each dataset:
const [stats, setStats] = React.useState<DatasetStats>({
  transacciones: 0,
  billeteras: 0,
  categorias: 0,
  presupuestos: 0,
})

const [txCount, walletCount, categoryCount, budgetCount] = await Promise.all([
  supabase
    .from("transacciones")
    .select("id", { count: "exact", head: true })
    .eq("usuario_id", activeUserId),
  supabase
    .from("billeteras")
    .select("id", { count: "exact", head: true })
    .eq("usuario_id", activeUserId),
  supabase
    .from("categorias")
    .select("id", { count: "exact", head: true })
    .eq("usuario_id", activeUserId),
  supabase
    .from("presupuestos")
    .select("id", { count: "exact", head: true })
    .eq("usuario_id", activeUserId),
])

Real-Time Counts

Shows current record counts from your database.Updates on page load.

Color-Coded Cards

Each dataset has a unique color:
  • Transactions: Green (emerald)
  • Wallets: Blue
  • Categories: Purple
  • Budgets: Amber

Best Practices

Export your data monthly for backup purposes:
  1. Select Transacciones
  2. Choose JSON format (most complete)
  3. Set date range to “This Month”
  4. Save to a secure location
Repeat for all datasets to maintain complete backups.
For tax season:
  1. Export Transacciones
  2. Filter by Income Only
  3. Set date range to the full tax year
  4. Choose CSV for Excel analysis
  5. Open in Excel and use pivot tables
To analyze budget performance:
  1. Export Presupuestos for each month
  2. Export Transacciones for the same months
  3. Use CSV format
  4. Compare “Límite (USD)” vs. actual spending in spreadsheet
When working with an accountant:
  1. Use PDF format for official records
  2. Export Transacciones with full date range
  3. Include Categorías export for reference
  4. Send both files together
Moving to another platform:
  1. Export all datasets in JSON format
  2. Preserve complete data structure
  3. VES amounts may need recalculation on import
  4. Use IDs to maintain relationships

Advanced Use Cases

Custom Scripts

JSON exports work well with programming languages:
import json

# Load exported transactions
with open('transacciones-2024-03-15.json', 'r') as f:
    transactions = json.load(f)

# Calculate total spending by category
spending_by_category = {}
for tx in transactions:
    if tx['type'] == 'gasto':
        category = tx['category']
        amount = tx['amountUsd']
        spending_by_category[category] = spending_by_category.get(category, 0) + amount

print(spending_by_category)

Excel Analysis

CSV exports open directly in Excel:
  1. Pivot Tables: Summarize spending by category
  2. Charts: Visualize income vs. expenses over time
  3. Formulas: Calculate totals, averages, trends
  4. Conditional Formatting: Highlight large expenses

Database Import

JSON structure maps to database tables:
-- Example: Import to PostgreSQL
CREATE TABLE imported_transactions (
  date TIMESTAMP,
  type VARCHAR(10),
  wallet VARCHAR(50),
  category VARCHAR(50),
  amount_usd DECIMAL(10,2),
  amount_ves DECIMAL(12,2),
  description TEXT
);

COPY imported_transactions 
FROM 'transacciones-2024-03-15.csv' 
DELIMITER ',' 
CSV HEADER;

Error Handling

Empty Result Set

if (rows.length === 0) {
  setStatusVariant("error")
  setStatusMessage("No hay datos para exportar con los filtros seleccionados.")
  setExporting(false)
  return
}
You’ll see: “No hay datos para exportar con los filtros seleccionados.” Common causes:
  • Date range excludes all transactions
  • Wallet has no transactions
  • Category not used in selected month
  • Movement filter excludes all records

Authentication Error

if (!userId) {
  setAuthError("Debes iniciar sesión nuevamente para exportar.")
  return
}
Solution: Refresh the page to restore your session.

Database Query Error

try {
  const { data, error } = await query
  if (error) throw error
  rows = normalizeTransactions(data)
} catch (error) {
  console.error("Error exporting data", error)
  setStatusVariant("error")
  setStatusMessage("No pudimos exportar la información. Intenta nuevamente.")
}
Solution: Check your internet connection and try again.

Troubleshooting

Cause: BCV rate unavailable at export time.What you’ll see:
  • CSV: Empty cell or “null”
  • JSON: "amountVes": null
  • PDF/TXT: Blank space
Solution:
  • Check BCV rate at top of export page
  • Wait for rate to load before exporting
  • USD columns always have values
Possible causes:
  1. Browser blocked download (check popup blocker)
  2. No data matching filters
  3. JavaScript error (check browser console)
Solution:
  • Allow popups from BudgetView domain
  • Adjust filters to include more data
  • Try a different browser
Cause: Character encoding or regional settings.Solutions:Method 1: Use Excel’s import wizard
  1. Open blank Excel workbook
  2. Data → From Text/CSV
  3. Select exported file
  4. Set “File Origin” to “UTF-8”
  5. Click “Load”
Method 2: Change system locale
  • Ensure Excel matches Spanish (Venezuela) settings
  • Decimal separator: comma
  • Thousands separator: period
Cause: Many columns on landscape page.Solution:
  • Use CSV or TXT for better readability
  • Or filter to fewer columns/records
  • PDF works best for < 100 rows
Cause: Not logged in (session expired).Indicator: Red error message “Debes iniciar sesión para exportar tus datos.”Solution: Refresh the page to log in again.

Privacy & Security

Important: Exported files contain sensitive financial data. Handle them securely.

Security Best Practices

After downloading:
  1. Store files in encrypted folders (e.g., BitLocker, FileVault)
  2. Use password-protected ZIP archives
  3. Don’t email unencrypted files
  4. Delete files after analysis if not needed
For backups:
  • Use encrypted cloud storage (Dropbox, Google Drive with encryption)
  • Or physical encrypted external drives
  • Rotate backups monthly
  • Test restore process periodically
When sharing with accountants or advisors:
  1. Use secure file transfer services
  2. Password-protect PDFs if possible
  3. Only share necessary date ranges
  4. Delete shared files after they’re no longer needed

Data Privacy Notes

  • User ID: Not included in exports (for privacy)
  • Wallet IDs: Only included in Wallets dataset (for reference)
  • Category IDs: Only included in Categories dataset
  • Transaction IDs: Not included (internal only)

Tracking Transactions

Learn how to create the data you’ll export

Creating Wallets

Understand wallet structure in exports

Setting Budgets

Review budget data before exporting

Currency Conversion

Understand USD/VES columns in exports

Build docs developers (and LLMs) love