A Python CLI tool I built during my first hackathon to transform Collectivity's spreadsheet data
into structured, validated JSON our team could import into the application.
Our team was building Collectivity, a website designed to securely organize digital and physical
collectibles. We had entered item information into an Excel spreadsheet, but the application needed
structured JSON that could be imported and used by the rest of the project.
I was worried that I wasn't going to be able to contribute much at my first-ever hackathon. Instead, I took the
data problem and independently built the converter. The completed tool was used by the team to turn
the spreadsheet into application-ready JSON.
// Interactive Walkthrough
From spreadsheet rows to validated JSON
This walkthrough uses the original HackMT spreadsheet data and output. It demonstrates the conversion flow in the
browser; the Python CLI itself runs locally.
Input fileCollectivity workbook
Reconstructed input preview4 of 21 records shown
Category
Sub-Category
Name
Status
Price
Card
Pokemon
2005 Pokemon Japanese Play Espeon
blank
48000
Card
Yu-Gi-Oh
2002 Gaia the Fierce Knight
blank
4560
Game Items
Console
Nintendo 64 Launch Edition
blank
75000
Game Items
Merch
blank
blank
blank
TerminalReady
$ python converter.py
Enter file to convert: [Collectivity workbook]
Press "Run converter.py" to continue.
Accept a spreadsheet filename and load one worksheet into a Pandas DataFrame.
02
Validate
Verify that the expected nine spreadsheet columns are available before processing.
03
Clean
Remove fully empty rows, fill down categories, normalize prices, and convert blank cells to null.
04
Flag
Mark records invalid when required Category or Name values are missing and record the errors.
05
Export
Write the records, timestamp, and total count to a formatted output.json file.
Challenge
Learning spreadsheet processing under a deadline
I had never handled spreadsheets with Python before the hackathon. I worked through documentation and
YouTube tutorials, then asked my team questions or used AI when those resources did not resolve a specific
logic issue. The implementation was my own, supported by persistence and plenty of energy drinks.
What I Learned
How Pandas loads and transforms spreadsheet data.
How to validate imperfect input instead of assuming every row is complete.
How to research unfamiliar concepts and deliver under time pressure.
How solving one specific problem can help the whole team move forward.
Current Limitations
Processes one worksheet at a time.
Uses a fixed nine-column schema.
Writes to a fixed output.json filename.
Runs as a local command-line program.
Future Improvements
Flexible column mapping and output naming.
Multiple-sheet conversion.
Clearer command-line arguments and error messages.
A browser interface for uploading and converting files.
GH
// Project Repositories
Review the code and team project.
See the converter implementation or explore the larger Collectivity application it supported.