{
  "id": 14132876,
  "title": "A Real .xlsx With Working Formulas in Plain JavaScript, No Library",
  "url": "https://urgent.news/2026/10/13/a-real-xlsx-with-working-formulas-in-plain-javascript-no-library",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-13T06:02:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ritusmoikaushik/a-real-xlsx-with-working-formulas-in-plain-javascript-no-library-50bc"
  },
  "original_language": "en",
  "account": "The author of a time card calculator website aimed to provide a proper .xlsx file for users to download their timesheets. Unlike CSV, which can misinterpret formatted cells as text or incorrect times, an .xlsx offers real dates, time cells, and accurate =SUM() formulas. The author achieved this using only 177 lines of code and a file size of 9 KB, without relying on any external JavaScript libraries.\n\nThe .xlsx file format is essentially a zip archive containing six essential files. The core file is the sheet data, written in XML format, containing the actual cells, strings, formulas, and their results. In the author's implementation, formulas and their answers coexist in the same cells, with the result cached in a variable for immediate display in Excel.\n\nA key challenge was formatting the time durations correctly. Excel's default h:mm format wraps at 24 hours, leading to incorrect displays for longer durations. To resolve this, the author used a custom number format with square brackets: [h]:mm, which accurately represents durations longer than 24 hours.",
  "summary": "I run a small free website, a time card calculator. You type in when you clocked in and out each day, it adds up the week, splits regular hours from overtime, and gives you something to hand over. It's built for hourly workers checking their pay, and for small business owners doing payroll for a handful of staff on a Friday afternoon. That last part, \"something to hand over\", is the bit that…",
  "key_points": [
    ".xlsx file provides accurate dates, times, and SUM formulas",
    "XLSX format is a zip archive with six essential files",
    "Custom number format [h]:mm displays time durations >24 hours"
  ],
  "editors_take": "Eliminating heavy external libraries for basic spreadsheet generation proves that lightweight, custom implementations can effectively handle complex data types and formula caching within standard web applications.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}