A desktop tool for converting Spectral Evolution / NaturaSpec .SED field-spectrometer files into structured Excel workbooks. Designed for batch processing of hyperspectral measurements collected during agricultural field trials and remote-sensing ground-truth campaigns.
The tool produces two workbooks per run:
<name>.xlsx— a spectral-only workbook withID,File_ID, and one column per wavelength (nm).metadata_<name>.xlsx— a full workbook including all SED header fields (date, time, GPS, instrument, integration, etc.) followed by the wavelength columns.
Both workbooks are styled with frozen ID columns, alternating row shading, and a banded header so they are immediately usable for QA and downstream analysis.
- Batch conversion of every
.SEDfile in a folder (recursive search included). - Two output workbooks in a single run — spectral-only and full metadata + spectral.
- Sortable numeric
IDextracted from the trailing digits of each filename (e.g.plot_00042.sed→42), with the full filename preserved asFile_ID. - All standard SED header fields parsed: instrument, detectors, date/time, temperature, integration, foreoptic, radiometric calibration, units, latitude/longitude, altitude, GPS time, satellites, and more.
- Self-installing Windows launcher (
.bat) that locates Python, creates an isolated virtual environment, installsopenpyxl, and runs the GUI — no manual setup required. - Cross-platform Python script that runs on Windows, macOS, and Linux for users who already have Python.
- Python 3.8 or later (Windows, macOS, or Linux). On Windows, the launcher will detect any of
py,python3, orpythonon the systemPATH. openpyxlPython package. The Windows launcher installs this automatically into an isolated virtual environment; manual users can install it withpip install openpyxl.- Tkinter — included with the standard Python installer on Windows and macOS. On Debian / Ubuntu Linux, install it with
sudo apt install python3-tk.
No internet connection is required at runtime once dependencies are installed.
-
Download
SED_to_Excel_Converter.batfrom this repository (or the latest release). -
Place it in any folder you have write access to. The first run creates a
sed_excel_envvirtual environment alongside the.batfile, so avoid placing it in a read-only location likeC:\Program Files. -
Make sure Python 3.8+ is installed. If it is not, download it from python.org/downloads and tick Add Python to PATH during installation.
-
Double-click
SED_to_Excel_Converter.bat. On the first run it will:- Locate your Python installation.
- Create an isolated virtual environment in
sed_excel_env\. - Install
openpyxlinto that environment. - Launch the GUI.
Subsequent runs reuse the existing environment and start the GUI in a couple of seconds.
Suitable for macOS, Linux, or any Windows user who prefers to manage their own environment.
# Clone the repository
git clone https://github.com/<your-username>/sed-to-excel-converter.git
cd sed-to-excel-converter
# (Optional but recommended) create a virtual environment
python -m venv .venv
# Windows: .venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# Install the single dependency
pip install openpyxl
# Launch the GUI
python sed_to_excel.py-
Launch the application using either method above. The main window opens with three input fields and a Convert button.
-
Input Folder — click Browse and select the folder containing your
.SEDfiles. Subfolders are searched automatically. The status bar reports how many.SEDfiles were detected. -
Output Folder — defaults to the input folder. Click Browse to choose a different location if you want to keep raw data and outputs separate.
-
Output File Name — defaults to
hyperspectral_data. The two output workbooks will be named:<name>.xlsx— spectral datametadata_<name>.xlsx— metadata + spectral data
The preview box updates live as you type.
-
Click Convert. Progress is shown in the progress bar and live log. If the output files already exist, you will be prompted before they are overwritten.
-
Review the results. A dialog confirms when conversion is complete and reports how many files were processed and where they were saved. Files that could not be parsed (missing data block, corrupt, etc.) are listed in the log and skipped.
<name>.xlsx — Spectral Data sheet
| ID | File_ID | 350 | 351 | … | 2500 |
|---|---|---|---|---|---|
| 1 | trial_2024_00001 | 0.0421 | 0.0438 | … | 0.1832 |
| 2 | trial_2024_00002 | 0.0395 | 0.0412 | … | 0.1811 |
metadata_<name>.xlsx — Full Data sheet
| ID | File_ID | Date | Time | Latitude | Longitude | Integration | … | 350 | 351 | … |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | trial_2024_00001 | 2024-09-12 | 10:32:14 | -31.952200 | 115.861100 | 100 | … | 0.0421 | 0.0438 | … |
The ID column is the trailing numeric portion of the filename and is intended for quick numeric sorting / joining. File_ID preserves the full original filename stem so each row can always be traced back to its source.
- Header parsing. Each
.SEDfile is read line by line. Lines before theData:marker are interpreted askey: valuepairs and matched against a controlled list of SED header fields. - Spectral parsing. Lines after
Data:are parsed as whitespace-separatedwavelength valuepairs. The first line afterData:(the column header) is skipped. - Wavelength alignment. All unique integer wavelengths across the input batch are collected and sorted; each row is filled column-by-column, leaving blanks where a wavelength is not present in a particular file.
- Excel writing. The two workbooks are written with
openpyxl, with styled headers, frozen panes (C2), and 4-decimal-place number formatting on spectral cells. - Self-installing launcher (Windows only). The
.batfile embeds the Python source as a base85+zlib-compressed string. On launch it locates Python, sets up a venv, installsopenpyxl, decodes the embedded source to a temporary.pyfile, executes it, and deletes the temporary file when the GUI closes.
“Python not found” when launching the .bat. Install Python 3.8+ from python.org and ensure Add Python to PATH is selected during installation. Then re-run the launcher.
“Failed to install openpyxl.” The launcher needs internet access for the first run only. Check your connection or proxy settings, then re-launch.
“No .SED files found.” The tool searches recursively, but only matches files with the extension .sed or .SED. Confirm your files use that extension.
Some files are skipped with a parse-failure message. This usually means the file is missing a Data: block or its spectral table is malformed. Open the file in a text editor to confirm. The remaining files in the batch are still processed.
The GUI does not appear on Linux. Install Tkinter: sudo apt install python3-tk (Debian / Ubuntu) or the equivalent for your distribution.
Excel reports a “number stored as text” warning on metadata columns. This is expected — SED metadata values like Date and GPS Time are stored as strings to preserve their original formatting.
.
├── sed_to_excel.py # Main GUI application (cross-platform)
├── SED_to_Excel_Converter.bat # Windows self-installing launcher
├── README.md # This file
└── docs/
└── User_Guide.docx # Full user guide (Word format)
Bipul Neupane, PhD Research Scientist, DPIRD Node Australian Plant Phenomics Network (APPN) Department of Primary Industries and Regional Development (DPIRD), Western Australia bipul.neupane@dpird.wa.gov.au
Bipul Neupane: Github
The tool was developed with claude.ai.
Specify your license here (e.g. MIT, Apache-2.0, or DPIRD internal use). Add a LICENSE file at the repository root.