Playground API
DocsStatsBlogStudio
Documentation Tree
Technical BlogFeature Deep Dives
  • Introduction
  • Quickstart
    5 min
  • How It Works
  • Recipes & Cookbooks
  • Platform Comparisons
  • Real-World Showcase
  • Interactive Studio
    Studio
  • GraphiQL IDE
    IDE
  • Session Quotas & Activity
  • Network Chaos Simulator
  • Atomic Sandbox Reset
  • Overview & Models
    Hub
  • Users Resource
  • Posts Resource
  • Comments Resource
  • Todos Resource
  • Custom Collections
    Custom
  • Multipart File Uploads
    Upload
  • Dynamic SVG Avatars
    SVG
  • Image Thumbnails
    CDN
  • Relational Filtering
  • Full-Text Search
  • Dynamic Sorting
  • Offset Pagination
  • Cursor Pagination
    Scroll
  • CSV & Excel Export & Import
    IO
  • Custom Collections
    CRUD
  • Overview & Architecture
    Hub
  • JWT Auth Flow
  • Refresh Token Rotation
    Mutex
  • RBAC Permission Matrix
    Roles
  • Expiry Simulation
  • Clock Skew Drift
  • Password Recovery Loop
  • Dual-Mode Sandboxing
  • GraphiQL IDE
    IDE
  • Relational Queries
  • Stateful Mutations
  • Realtime Subscriptions
  • Overview & Flowcharts
    Hub
  • Hosted Checkout
    Stripe
  • Payment Intents API
  • 3DS Challenge Modal
    Modal
  • Customers Vault
  • Charges & Refunds
  • Test Cards Catalog
  • Overview & Channels
    Hub
  • Virtual Email Mailbox
    Mailtrap
  • Virtual SMS Terminal
    Phone
  • In-App Notifications
  • Message Dispatcher
  • Realtime Studio
    Studio
  • Native WebSocket (/ws)
  • Socket.io Gateway
  • Presence & Echo Bot
  • Server-Sent Events (SSE)
    SSE
  • Analytics Telemetry
  • Webhook Subscriptions
  • HMAC SHA-256 Signatures
  • Delivery Logs
  • Manual Retry Simulator
  • Network Latency Delay
  • HTTP Status Codes
  • Rate-Limit Simulator
    429
  • Flaky Network & Jitter
    Chaos
  • Session Quotas & Activity
  • JSON Snapshots
    JSON
  • Headless CI/CD Testing
    CI
  • Mobile QR Code Sync
  • System Metrics & Health
  • Atomic Sandbox Reset
  • Official TypeScript SDK
  • Multi-Language Generators
  • DevTools Extension
  • OpenAPI 3.1 Spec
    JSON
  • Postman Collection v2.1
  • Bruno Collection
  • Insomnia Workspace
  • TypeScript .d.ts
    .d.ts
  • AI Prompt Rules
    Rules
  • Context Index (llms.txt)
  • Full Schema (llms-full.txt)
  • Manifest (product.json)
  • All Feature Articles
    Blog
  • React CRUD Without Backend
    Deep Dive
  • Why Static APIs Fail
  • Mocking Stateful Auth
  • WebSockets & SSE Guide
Technical Blog
Articles

In-depth articles explaining stateful mock APIs, WebSockets, payments, and frontend resilience.

Read Articles
PreviousCursor Pagination
NextCustom Collections
Data & Query Engine

CSV & Excel Tabular Export & Import

Complete round-trip spreadsheet engineering for mock databases. Convert any REST resource or custom collection into real .csv or .xlsx spreadsheet files, and import tabular data back into your sandbox with strict column schema validation.

1. Instant Tabular File Download

Export any system resource or custom collection as standard RFC 4180 CSV or native Excel (.xlsx) workbooks:

posts

Blog Articles
100 rows

100 articles with title, body, and user_id foreign keys.

users

User Directory
10 rows

10 user profiles with nested dot-notation address.* and company.*.

comments

Discussion Comments
500 rows

500 comments with postId, author name, email, and body text.

todos

Task Checklists
200 rows

200 todos with boolean completion status and userId.

custom/products

E-Commerce Products
Custom Schema

Catalog items with SKU, price, stock boolean, and category.

custom/orders

Orders Directory
Custom Schema

Store orders with customer details, order totals, and fulfillment status.

Filtered & Relational Spreadsheets on the FlyQuery filters apply directly to live CSV and Excel streams.

2. Interactive Spreadsheet Import Workbench

Upload a .csv or .xlsx file or paste CSV text to import into your sandbox with schema validation:

Quick Sample:
3 records detected
Parsed Table Structure Preview3 columns detected
titlebodyuserId
Automated Test Post 1Dispatched via CSV bulk spreadsheet import1
Automated Test Post 2Second row parsed with strict column validation2
Automated Test Post 3Third item merged into session overlay database1

Database Column Validation Rules

Every imported row is strictly validated against database constraints and system columns before entering your overlay:

ResourceRequired HeadersOptional / Nested ColumnsAutomatic Transformations
poststitle, bodyuserId (or user_id)userId is integer coerced (default 1). System metadata (id, createdAt) stripped for new local IDs.
usersname, username, emailphone, website, address.*, company.*Validates email RFC format. Unflattens dot notation (address.city) into nested JSON structures.
commentsname, email, bodypostId (or post_id)Validates email format. Post ID defaults to 1 if omitted.
todostitlecompleted, userIdCoerces "true"|"false"|"1"|"0" to strict boolean values (defaults to false).
custom_*Any non-empty propertyAny custom domain columnsAuto-coerces numbers and booleans. Rejects prototype pollution (__proto__). Max 500 rows/batch.

Developer Integration Recipes

Code patterns for importing and exporting spreadsheet files programmatically:

services/uploadSpreadsheet.js
1
// Upload CSV or Excel file to /:resource/import
2
async function uploadSpreadsheet(file, resource = 'posts') {
3
const formData = new FormData();
4
formData.append('file', file); // File from <input type="file">
5
6
const response = await fetch(https://playground.nileslabs.com/api/v1/${resource}/import`, {
7
method: 'POST',
8
body: formData,
9
credentials: 'include'
10
});
11
12
if (!response.ok) {
13
const errorData = await response.json();
14
console.error('Validation issues:', errorData.details);
15
throw new Error(errorData.message || 'Import failed');
16
}
17
18
const result = await response.json();
19
console.log('Total records imported:', result.totalImported);
20
return result;
21
}
Next Query Feature

Custom Collections CRUD

Related Feature

Session Snapshot JSON Import & Export