CSV to Wikitable
The CSV to Wikitable converter is a web-based tool that transforms CSV (Comma-Separated Values) data into MediaWiki table markup format. This tool is particularly useful for Wikipedia editors and MediaWiki users who need to convert spreadsheet data into wiki-formatted tables.
Tool URL: https://bambots.brucemyers.com/csv2wikitable.php
Features
[edit]- Multiple field separator options
- Configurable text delimiters
- Automatic header row detection
- Column wikilinking capabilities
- Support for both file upload and direct text input
- One-click copy to clipboard functionality
Interface Components
[edit]Field Separator Selection
[edit]Purpose: Defines the character that separates values in your CSV data.
Available Options:
,(comma) – Default CSV format;(semicolon) – Common in European locales|(pipe) – Alternative delimiter<space>– Space-separated values<tab>– Tab-separated values (TSV)
Usage: Select the delimiter that matches your input data format.
Text Delimiter Selection
[edit]Purpose: Specifies the character used to enclose text fields that may contain the field separator.
Available Options:
"(double quote) – Standard CSV format'(single quote) – Alternative text enclosure<none>– No text delimiter
Example:
"Smith, John",25,Engineer
With " as text delimiter, "Smith, John" is treated as a single field.
First Row Contains Headings
[edit]Purpose: Checkbox to indicate whether the first row of your CSV data should be treated as column headers.
Behavior:
- Checked: First row generates table headers using
!syntax in wikitable. - Unchecked: All rows treated as data rows using
|syntax.
Example Output:
With headers checked:
{| class="wikitable"
! Name
! Age
|-
| John
| 25
|}
With headers unchecked:
{| class="wikitable" |- | Name | Age |- | John | 25 |}
Wikilink Columns
[edit]Purpose: Automatically converts specified column values into internal wiki links.
Configuration:
- Two dropdown menus available
- Each can be set to columns 1–10
- Default: No columns selected
Functionality: When a column is designated for wikilinking, each value in that column is wrapped in double square brackets [[]], creating a clickable internal wiki link.
Example:
Input CSV:
Country,Capital,Population France,Paris,67000000
With column 1 (Country) wikilinked:
{| class="wikitable" ! Country ! Capital ! Population |- | [[France]] | Paris | 67000000 |}
Use Cases:
- Linking article names to their respective Wikipedia pages
- Creating navigable references in data tables
- Connecting related wiki content
Input File (Optional)
[edit]Purpose: Upload CSV files directly from your computer.
Specifications:
- Accepts standard CSV file formats
- Alternative to manual text input
- File size limits may apply (server-dependent)
Usage:
- Click the file input button
- Select your CSV file from your file system
- File contents will be processed automatically
Note: The interface also mentions support for URLs from *.wmflabs.org domains, suggesting integration with Wikimedia Labs infrastructure.
CSV Rows (Optional)
[edit]Purpose: Manual text input area for pasting CSV data directly.
Features:
- Multi-line text area
- Accepts raw CSV formatted text
- Alternative to file upload
Usage:
- Copy your CSV data from spreadsheet applications (Excel, Google Sheets, etc.)
- Paste directly into this text area
- Ensure proper formatting matches your selected field separator
Example Input:
Name,Age,Occupation Alice,30,Developer Bob,25,Designer Carol,35,Manager
Wikitable Output
[edit]Purpose: Displays the converted MediaWiki table markup.
Features:
- Read-only display area
- Shows complete wikitable syntax
- Ready for copy-paste into wiki pages
Output Format: The tool generates standard MediaWiki table syntax:
{| class="wikitable"
! Header 1
! Header 2
|-
| Data 1
| Data 2
|-
| Data 3
| Data 4
|}
Copy Functionality: Use Ctrl+C (Windows/Linux) or Cmd+C (Mac) to copy the generated wikitable. It can then be pasted directly into a MediaWiki editor, maintaining all formatting and structure.
MediaWiki Table Syntax Reference
[edit]Basic Structure
[edit]{| class="wikitable"
! Column 1 Header
! Column 2 Header
|-
| Row 1, Cell 1
| Row 1, Cell 2
|-
| Row 2, Cell 1
| Row 2, Cell 2
|}
Syntax Elements
[edit]| Element | Description |
|---|---|
| Table opening tag | |
class="wikitable"
|
Applies standard Wikipedia table styling |
!
|
Header cell |
| - | Row separator |
| Data cell | |
| } | Table closing tag |
Wikilinks
[edit]- Internal links:
[[Page Name]] - Piped links:
[[Page Name|Display Text]] - External links:
Display Text
Workflow Guide
[edit]Standard Workflow
[edit]Prepare Your Data
- Ensure CSV data is properly formatted
- Identify field separator used
- Determine if first row contains headers
Configure Settings
- Select appropriate field separator
- Choose text delimiter if needed
- Check "First row contains headings" if applicable
- Set wikilink columns if desired
Input Data
- Either upload CSV file OR paste CSV text
- Verify data appears correctly
Generate Output
- Tool automatically converts input to wikitable format
- Review output for accuracy
Copy and Use
- Use keyboard shortcut to copy wikitable markup
- Paste into MediaWiki editor
- Preview and publish
Use Cases
[edit]Wikipedia Data Tables
[edit]Converting statistical data, comparison tables, or reference information for Wikipedia articles.
Example: Country population statistics, historical data tables, product comparisons.
Wiki Documentation
[edit]Creating formatted tables for technical documentation on MediaWiki installations.
Example: API reference tables, configuration parameters, command lists.
Collaborative Content
[edit]Converting shared spreadsheet data into wiki format for team wikis or knowledge bases.
Example: Project tracking tables, team rosters, resource inventories.
Data Migration
[edit]Transitioning data from spreadsheet applications to wiki-based platforms.
Best Practices
[edit]Data Preparation
[edit]Clean Your Data
- Remove unnecessary formatting from source
- Ensure consistent delimiter usage
- Check for embedded delimiters in text fields
Use Text Delimiters
- Apply text delimiters when data contains separator characters
- Prevents column misalignment
Structure Headers Clearly
- Use descriptive, concise header names
- Avoid special characters in headers
Wikilinking Strategy
[edit]Link Strategically
- Only link columns with article-worthy terms
- Avoid overlinking common words
Verify Links
- Ensure linked pages exist in your wiki
- Check for correct capitalization and spelling
Consider Piped Links
- For display text different from page name, manually add piped links after conversion
Quality Control
[edit]Preview Output
- Always preview in wiki before publishing
- Check table rendering and formatting
Test with Sample Data
- Try small dataset first to verify settings
- Expand to full dataset once confirmed
Maintain Backup
- Keep original CSV data as backup
- Allows regeneration if issues occur
Troubleshooting
[edit]Common Issues
[edit]- Problem
- Columns not separating correctly
- Solution: Verify correct field separator is selected
- Cause: Mismatch between actual and selected delimiter
- Problem
- Text split across multiple columns
- Solution: Select appropriate text delimiter
- Cause: Embedded separators in text fields without text delimiters
- Problem
- Headers appearing as data rows
- Solution: Check "First row contains headings" checkbox
- Cause: Setting not enabled when headers present
- Problem
- Wikilinks not appearing
- Solution: Verify correct column number selected (1-based indexing)
- Cause: Wrong column selected or column out of range
- Problem
- Table not rendering in wiki
- Solution: Check for syntax errors, ensure complete table tags
- Cause: Incomplete copy or corrupted markup
Technical Specifications
[edit]Input Limitations
[edit]- Maximum columns supported: At least 10 (based on wikilink options)
- File upload supported from local storage
- URL input supported for
*.wmflabs.orgdomains
Output Format
[edit]- MediaWiki markup language
- Standard wikitable class applied
- Compatible with Wikipedia and MediaWiki installations
Browser Compatibility
[edit]- Modern web browsers with JavaScript enabled
- Clipboard API support for copy functionality
Related Resources
[edit]MediaWiki Documentation
[edit]CSV Standards
[edit]Tools
[edit]- Complementary tools for wiki editing
- CSV validators and formatters
- MediaWiki syntax checkers
Support and Feedback
[edit]For issues, questions, or feedback about this tool, refer to the tool's hosting site at bambots.brucemyers.com.