Repository navigation
ext: save-as-xlsx 1.1.0 - #253
Conversation
Dates, timestamps and times become Excel dates: a date, timestamp or time column's values in PostgreSQL's ISO output are written as Excel date numbers with yyyy-mm-dd, yyyy-mm-dd hh:mm:ss or hh:mm:ss (milliseconds when the value has a fraction), and such a column gets a width that shows them rather than ####. A timestamp with time zone keeps the wall clock the grid shows; what Excel has no date for (before 1 March 1900, infinity, BC, another DateStyle, time with time zone) stays text as written. A value cut at Excel's 32,767 characters is no longer cut in silence: the Log says how many were cut and where the first one is. The README no longer points at an extension the marketplace does not have. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thank you again, @ibelic, and for taking both ideas from the review so carefully! 1.1.0 is merged and reaches the Marketplace with the next catalog build. We tried it before merging: the format called as PlumeSQL calls it, on dates, timestamps (with microseconds and with offsets), times, 1900-02-28 and 1900-03-01, 2023-02-29, 9999-12-31, The wall clock kept for a |
What this adds or changes
save-as-xlsx1.1.0, the two ideas from the review of #251:date,timestamportimecolumn, values in PostgreSQL's ISO output (the default DateStyle) are written as Excel date numbers, so they sort and filter as dates.yyyy-mm-dd,yyyy-mm-dd hh:mm:ssorhh:mm:ss, with.000when the value has a fraction of a second.####.timestamp with time zonekeeps the wall clock the grid shows and drops its offset, since an Excel date has no zone.infinity, BC dates, years past 9999, another DateStyle's output,time with time zone(its offset is data),24:00:00and a date a formatting extension has reformatted.ctx.log, with how many values were cut and where the first one is. For example:2 values were longer than the 32,767 characters an Excel cell holds and were cut to that length; the first is in column notes, row 2.Type modifiers are now dropped before a column's type is matched, so
timestamp(3) with time zoneandnumeric(12,2)are read as their base types.Tested by calling the format the way PlumeSQL does and writing its string as UTF-8:
unzip -tandxmllint, and opens in openpyxl and macOS Quick Look;datetime,dateortimewith its number format;tsc --strict --checkJspasses againstdocs/plumesql-extension.d.ts.Checklist
extensions/<Category>/<id>/, the main file named after the idmanifest.jsoncomplete,versionbumped if any installed file changed (1.0.0 to 1.1.0)README.mdfollows the template inextensions/README.md, with a screenshot or clip undermedia/node extensions/tools/catalog.mjs --checkpasses locally@confirm; every reference is schema-qualified; the password never leaves@env(no SQL and no database access)externals, every referenced extension independencies(none of either)🤖 Generated with Claude Code