FEAT: Add legacy .xls support to converter task#76
Merged
Shivang Nagta (ShivangNagta) merged 3 commits intoJun 19, 2026
Merged
Conversation
Contributor
|
Shivang Nagta (@ShivangNagta) Maintaining a separate fork of |
Contributor
Author
I get the concern, let me see if i could find something else |
| "os" | ||
|
|
||
| "github.com/patterninc/grate" | ||
| gratexls "github.com/patterninc/grate/xls" |
Contributor
There was a problem hiding this comment.
Can you please look into one of the packages from https://pkg.go.dev/
Mayuresh Pawar (Mayureshpawar29)
approved these changes
Jun 19, 2026
80f47c8
into
patterninc:main
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds support for converting legacy Excel 97-2003 (.xls) files to CSV
via a new
format: xlson the converter task. The existingxlsxconverter usesexcelize, which only reads modern Office Open XML (
.xlsx/.xlsm) and cannotparse the legacy binary
.xlsformat - so a separate handler is required.Implementation
format: xlshandler (xls.go),backed by
github.com/yamitzky/xlrd-go](https://github.com/yamitzky/xlrd-go) - apure-Go port of Python's
xlrd.xlsxconverter's options (sheets,skip_rows,skip_rows_by_sheet,sanitize_headers,sanitize_sheet_names) and per-sheet CSV output (one record persheet, sheet name in the
xlsx_sheet_namecontext key).which is a much lower level library providing cell value and cell type instead, we need to perform
the formatting ourself, so the number of lines of codes is more than expected.
Testing
Created and ran unit tests -
TestFormatDate,TestFormatNumber,TestBoolText,TestIsBuiltinDateFormat,TestTrimTrailingEmptythe test file is not included in the commit.Tested against
automotive_browse_tree_guide.xlscontaining 4 sheets(1 hidden).YAML used:
One of the sheet in excel

Its output in csv

All output csv files:

Checks for all supported options:

Types of changes
Checklist