Skip to content

Add format plugins with export/import and marked PNG - #38

Merged
fanfeilong merged 1 commit into
masterfrom
cursor/format-plugin-export-import-8363
Sep 24, 2026
Merged

fanfeilong merged 1 commit into
masterfrom
cursor/format-plugin-export-import-8363

Conversation

@fanfeilong

Copy link
Copy Markdown
Collaborator

Summary

  • Introduce IFormatPlugin + FormatRegistry so conversion outputs (md / json / tex / img) are plugins with export and import (back to .xlsx).
  • Shared precise payload: TableDocument with marker EXCELTK1 (embedded in md/tex comments, JSON, or PNG).
  • New marked image plugin (-t img): renders a PNG preview and stores the payload in private chunk tkXl; unmarked PNGs are rejected on import.
  • Minimal OpenXML writer (XlsxWorkbookWriter) for import; CLI gains -import / -out.
  • Docs: docs/format-plugins.md; README updated; test.sh covers round-trip + unmarked rejection.

Usage

exceltk -t img -xls book.xlsx
exceltk -t img -import bookSheet1.png -out restored.xlsx
exceltk -t md -import bookSheet1.md -out restored.xlsx

Demo

Marked PNG export preview

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Refactor md/json/tex outputs behind IFormatPlugin so each format can
export from Excel and import back to xlsx. Add an img plugin that
embeds EXCELTK1 payloads in a private PNG tkXl chunk and rejects
unmarked images for precise round-trips.

Co-authored-by: Fan Feilong <fanfeilong@gmail.com>
@fanfeilong
fanfeilong marked this pull request as ready for review September 24, 2026 01:41
@fanfeilong
fanfeilong merged commit f12900e into master Sep 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants