XLSX Range Extractor

Extract a specific sheet/range/named-range from Excel into JSON with coordinates or record objects

Extract partial spreadsheet data as JSON.

  • Pick a worksheet by name
  • Extract by explicit A1 range or by named range
  • Output as cell objects (with row/column/address) or records (header-based objects)

Example Results

2 examples

Extract Named Range as Cell Objects

Read a named range and keep coordinates for each non-empty cell

xlsx-range-extractor-example1.json View File
View input parameters
{ "excelFile": "/public/samples/xlsx/workbook-sales.xlsx", "mode": "cell_objects", "namedRange": "SalesRegion", "includeCoordinates": true }

Extract A1 Range as Records

Use header row and convert selected range into object array

xlsx-range-extractor-example2.json View File
View input parameters
{ "excelFile": "/public/samples/xlsx/workbook-sales.xlsx", "mode": "records", "range": "A1:C20", "headerRow": 1 }

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel

Key Facts

Category
Conversion & Encoding
Input Types
file, select, text, number, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The XLSX Range Extractor is a precise utility designed to convert specific sections of your Excel spreadsheets into structured JSON format. Whether you need to isolate a named range, a specific A1 coordinate block, or an entire worksheet, this tool allows you to extract data as either raw cell objects with coordinate metadata or as clean, header-based record objects.

When to Use

  • When you need to isolate specific data segments from large, complex Excel workbooks for API integration.
  • When you want to convert spreadsheet tables into JSON records using a specific row as the header.
  • When you need to preserve cell-level metadata, such as row and column indices, for programmatic analysis.

How It Works

  • Upload your Excel file and select your preferred extraction mode: 'Cell Objects' for coordinate-based data or 'Record Objects' for structured JSON arrays.
  • Define the target data by specifying a sheet name, an explicit A1 range, or a pre-defined named range.
  • Configure optional settings like the header row index or toggle coordinate inclusion to tailor the output to your schema requirements.
  • Process the file to generate and download your structured JSON output.

Use Cases

Converting Excel-based configuration tables into JSON files for web application settings.
Extracting specific data regions from financial reports to feed into automated data visualization dashboards.
Parsing legacy Excel data into structured JSON records for database migration or API testing.

Examples

1. Extracting Named Range as Cell Objects

Data Analyst
Background
An analyst needs to extract a specific 'SalesRegion' range from a large workbook to map cell locations for a custom audit script.
Problem
Manually identifying cell coordinates in a massive spreadsheet is error-prone.
How to Use
Upload the workbook, set the mode to 'Cell Objects', and enter 'SalesRegion' in the Named Range field.
Example Config
mode: cell_objects, namedRange: SalesRegion, includeCoordinates: true
Outcome
A JSON file containing each cell's value paired with its exact row and column address.

2. Converting Table to JSON Records

Web Developer
Background
A developer needs to import a product inventory list from Excel into a NoSQL database.
Problem
The Excel file contains extra metadata rows, and the data needs to be in a standard JSON array format.
How to Use
Upload the file, select 'Record Objects', specify the range 'A1:C20', and set the header row to 1.
Example Config
mode: records, range: A1:C20, headerRow: 1
Outcome
A clean JSON array where each row is an object with keys derived from the first row of the selected range.

Try with Samples

json, xml, xlsx

Related Hubs

FAQ

Can I extract data from a specific sheet?

Yes, you can specify the sheet name in the settings to target data exclusively from that worksheet.

What is the difference between Cell Objects and Record Objects?

Cell Objects return individual cells with their row/column coordinates, while Record Objects treat the first row as headers to create an array of key-value objects.

Does the tool support named ranges?

Yes, you can input the name of a defined range directly to extract that specific area without needing to know the exact A1 coordinates.

Can I remove empty cells from the output?

Yes, the 'Drop Blank Cells/Rows' option is enabled by default to ensure your JSON output remains clean and concise.

What file formats are supported?

The tool supports standard Excel formats, including .xlsx and .xls files.

API Documentation

Request Endpoint

POST /en/api/tools/xlsx-range-extractor

Request Parameters

Parameter Name Type Required Description
excelFile file (Upload required) Yes -
mode select No -
sheetName text No -
range text No -
namedRange text No -
headerRow number No -
includeCoordinates checkbox No -
dropBlankCells checkbox No -

File type parameters need to be uploaded first via POST /upload/xlsx-range-extractor to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-xlsx-range-extractor": {
      "name": "xlsx-range-extractor",
      "description": "Extract a specific sheet/range/named-range from Excel into JSON with coordinates or record objects",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-range-extractor",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]