XLSX Unpivot Normalizer

Unpivot wide tables (e.g., month columns) into normalized long-form records for database ingestion

Convert wide tables to long format.

  • Keep identifier columns as-is
  • Convert value columns into key-value pairs
  • Typical use case: Jan,Feb,Mar -> month,value
  • Export as XLSX or JSON

Example Results

1 examples

Unpivot Monthly Wide Table

Convert Jan/Feb/Mar columns into normalized month/value rows

xlsx-unpivot-normalizer-example1.xlsx View File
View input parameters
{ "excelFile": "/public/samples/xlsx/workbook-sales.xlsx", "idColumns": "name,region", "valueColumns": "Jan,Feb,Mar", "keyColumnName": "month", "valueColumnName": "value" }

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, text, number, select, checkbox
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The XLSX Unpivot Normalizer is a professional utility designed to transform wide-format spreadsheets into normalized, long-form datasets. By converting multiple value columns into structured key-value pairs, it prepares your data for seamless database ingestion, BI tool integration, or advanced statistical analysis.

When to Use

  • When you have time-series data spread across multiple columns (e.g., Jan, Feb, Mar) that needs to be in a single column for database compatibility.
  • When preparing Excel reports for import into SQL databases or data visualization platforms that require tidy data formats.
  • When you need to clean up messy, wide-format spreadsheets by removing empty cells and standardizing numeric values during the conversion process.

How It Works

  • Upload your Excel file and specify the ID columns that should remain fixed as identifiers.
  • Define the value columns you wish to unpivot and assign names for the resulting key and value columns.
  • Configure optional settings such as dropping empty values or parsing numeric data types.
  • Download your normalized data in either XLSX or JSON format, ready for your next workflow step.

Use Cases

Converting monthly sales spreadsheets into a single 'Month' and 'Revenue' column structure for SQL database ingestion.
Normalizing survey results where each question is a column, transforming them into a 'Question' and 'Response' format for analysis.
Preparing financial budget reports for BI tools by collapsing quarterly data columns into a standardized long-form table.

Examples

1. Normalizing Monthly Sales Data

Data Analyst
Background
A sales report contains columns for 'Name', 'Region', 'Jan', 'Feb', and 'Mar'.
Problem
The wide format makes it impossible to calculate total sales per region using standard pivot tables or SQL queries.
How to Use
Upload the file, set ID columns to 'name,region', and select 'Jan,Feb,Mar' as the value columns.
Example Config
keyColumnName: 'month', valueColumnName: 'revenue', outputMode: 'xlsx'
Outcome
A clean, long-form table with 'name', 'region', 'month', and 'revenue' columns, ready for database import.

2. Cleaning Survey Responses

Researcher
Background
A survey export has one column per question, resulting in a very wide and sparse spreadsheet.
Problem
The data is difficult to visualize because the questions are headers rather than row values.
How to Use
Identify the participant ID column, select all question columns as value columns, and enable 'Drop Empty Values'.
Example Config
idColumns: 'participant_id', keyColumnName: 'question_id', valueColumnName: 'answer'
Outcome
A normalized dataset where each row represents a single participant's answer to a specific question.

Try with Samples

xml, xlsx, xls

Related Hubs

FAQ

What is an unpivot operation?

An unpivot operation takes data organized in wide columns and rotates it into a long, vertical format, making it easier to filter and aggregate.

Can I keep specific columns unchanged?

Yes, you can specify ID columns that will be preserved as-is for every row generated during the unpivot process.

What output formats are supported?

You can export your normalized data as either an XLSX file or a JSON file, depending on your downstream requirements.

Does the tool handle empty cells?

Yes, you can enable the 'Drop Empty Values' option to automatically exclude rows where the value is blank, keeping your dataset clean.

Is there a limit to the file size?

The tool supports Excel files up to 100MB, ensuring you can process large datasets efficiently.

API Documentation

Request Endpoint

POST /en/api/tools/xlsx-unpivot-normalizer

Request Parameters

Parameter Name Type Required Description
excelFile file (Upload required) Yes -
sheetName text No -
headerRow number No -
idColumns text Yes -
valueColumns text No -
keyColumnName text No -
valueColumnName text No -
outputMode select No -
dropEmptyValues checkbox No -
parseNumbers checkbox No -

File type parameters need to be uploaded first via POST /upload/xlsx-unpivot-normalizer 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-unpivot-normalizer": {
      "name": "xlsx-unpivot-normalizer",
      "description": "Unpivot wide tables (e.g., month columns) into normalized long-form records for database ingestion",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=xlsx-unpivot-normalizer",
      "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]