5 Commits
Author SHA1 Message Date
Lauri Ojansivu b1841b7525 Write the card and board Excel exports as they are drawn, reading each picture only when it is written.
The card Excel export, and the board export drawn in the card layout, read
every picture of the card or board into memory while drawing the sheet and
wrote the whole workbook at the end. They now write through
createWorkbookWriter to the response, and the board export writes each card's
rows out once the card is drawn. With the @wekanteam/exceljs fork's streaming
writer (.tools/exceljs: archiver 8 support and pictures on a streaming sheet)
each picture is a function the writer calls when it reaches it, so one is open
at a time and a picture that cannot be read is written empty rather than
ending the download. The fork is recognised by WorkbookWriter._addDrawing;
until a release with it is installed, these exports take the buffered writer
as before. A failure after the first byte now ends the download instead of
leaving it waiting.

Thanks to markusst1982 and xet7 !
2026-10-09 23:39:18 +03:00
Lauri Ojansivu 278db0ada3 Write dates as real date cells in every Excel export.
Reported directly, with a LibreOffice screenshot: the Frappe Gantt view's
Excel export showed Start/Due/End as ISO text ("2026-09-23T09:00:00.000Z").
ExporterChartExcel wrote cell.toISOString() into the cell. A date is now a
real date cell with a date number format (yyyy-mm-dd hh:mm), so the
spreadsheet shows it in its own date format, sorts it as a date and can do
arithmetic on it; the "-" placeholder for an unset date stays text. Every
chart export (Gantt, Time, the report charts) shares this exporter.

The follow-up ask - every other Excel export too:
- The board and card Excel exports draw the shared card document
  (models/lib/cardDocument.js), whose meta pairs were pre-formatted text
  (fmtDate), so Created/Received/Start/Due/End/Last activity were text
  there as well. A date pair now carries the raw Date as a third element
  ([label, text, Date]); renderCardDocumentExcel writes that as a date cell
  and the PDF keeps printing the text. ExporterExcelBoard's own
  Created/Modified lines get the same treatment.
- The legacy whole-board Excel export (ExporterExcel.js) already wrote Date
  values into numFmt columns; nothing to change, pinned as such.

tests/chartExcelDateCells.test.cjs drives the chart row-writing branch
against a stand-in worksheet and pins the other exporters' shapes;
tests/pdfExport.test.cjs updated for add()'s third argument.

Thanks to xet7 !
2026-09-11 10:49:27 +03:00
Lauri Ojansivu ef66347f07 Place six Excel attachment previews per row.
Use one worksheet column per preview, put each filename in the cell directly below, and begin a new image and filename row after every six attachments.\n\nThanks to xet7 !
2026-08-17 02:07:39 +03:00
Lauri Ojansivu fb52149e94 Align PDF and Excel card attachment layouts.
Place three previews per row with filename-only captions below, retain every attachment in the six-field details table, and draw PDF labels, metadata positions, and checklist progress like the printable Excel card.\n\nThanks to xet7 !
2026-08-17 01:52:34 +03:00
Lauri Ojansivu c796fc6c6b Complete multilingual PDF and Excel exports.
Embed OFL-licensed GNU Unifont fonts in PDF exports, centralize the printable Excel card renderer on the shared card document, and consistently use the saved user language or browser fallback plus the opened card's date format. Document the XLSX font-embedding limitation and cover the locale, font, PDF, and workbook behavior with regression tests.\n\nThanks to xet7 !
2026-08-17 00:50:10 +03:00