<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Meni Kroizer</title>
    <description>The latest articles on DEV Community by Meni Kroizer (@meni_kroizer_16e2b4506a7e).</description>
    <link>https://dev.to/meni_kroizer_16e2b4506a7e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3686153%2Fbc9fc893-244c-4155-8832-f3dfd600b4d9.jpg</url>
      <title>DEV Community: Meni Kroizer</title>
      <link>https://dev.to/meni_kroizer_16e2b4506a7e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/meni_kroizer_16e2b4506a7e"/>
    <language>en</language>
    <item>
      <title>Export Real Excel Workbooks in JavaScript (Part 2): Using Excel Templates with Connected Workbooks</title>
      <dc:creator>Meni Kroizer</dc:creator>
      <pubDate>Tue, 13 Jan 2026 15:12:06 +0000</pubDate>
      <link>https://dev.to/meni_kroizer_16e2b4506a7e/export-real-excel-workbooks-in-javascript-part-2-using-excel-templates-with-connected-workbooks-1dji</link>
      <guid>https://dev.to/meni_kroizer_16e2b4506a7e/export-real-excel-workbooks-in-javascript-part-2-using-excel-templates-with-connected-workbooks-1dji</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/meni_kroizer_16e2b4506a7e/how-to-export-real-excel-workbooks-in-javascript-using-connected-workbooks-2fkg"&gt;&lt;strong&gt;Part 1&lt;/strong&gt;&lt;/a&gt;, we looked at how to export real Excel workbooks from JavaScript using Connected Workbooks.&lt;br&gt;
In practice, though, most teams don’t want raw tables, they want reports that follow existing Excel templates with charts, formulas, and branding already in place.&lt;br&gt;
This is where Connected Workbooks really starts to shine.&lt;br&gt;
With template-based exports:&lt;/p&gt;

&lt;p&gt;In Excel you defines how the workbook looks,&lt;br&gt;
Your application defines what data goes into it,&lt;br&gt;
Connected Workbooks lets you keep that boundary clean.&lt;/p&gt;
&lt;h2&gt;
  
  
  What an "Excel Template" Means Here
&lt;/h2&gt;

&lt;p&gt;An Excel template, in this context, is simply:&lt;br&gt;
A normal .xlsx file,Created and edited in Excel Containing one or more named tables,&lt;br&gt;
Those tables act as injection points.&lt;/p&gt;

&lt;p&gt;Connected Workbooks does not generate charts, formulas, or formatting. Instead, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loads the template&lt;/li&gt;
&lt;li&gt;Finds a named table&lt;/li&gt;
&lt;li&gt;Replaces its rows with new data&lt;/li&gt;
&lt;li&gt;Produces a final workbook where everything else stays intact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because formulas and charts reference tables, they update automatically when the data changes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Preparing an Excel Template (Excel-Side Work)
&lt;/h2&gt;

&lt;p&gt;Before writing any code, you prepare the template in Excel.&lt;br&gt;
A typical flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Excel and create a new workbook&lt;/li&gt;
&lt;li&gt;Add a worksheet (for example: Dashboard)&lt;/li&gt;
&lt;li&gt;Insert a table (Ctrl + T)&lt;/li&gt;
&lt;li&gt;Name the table (for example: SalesTable)&lt;/li&gt;
&lt;li&gt;Build formulas, charts, or PivotTables that reference that table in a diffrent sheet&lt;/li&gt;
&lt;li&gt;Apply branding and formatting&lt;/li&gt;
&lt;li&gt;Save the file as .xlsx&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The table name and sheet name are critical this is how your application knows where to inject data.&lt;/p&gt;

&lt;p&gt;From this point on, Excel owns presentation, and your code only supplies rows.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using a Template with Connected Workbooks
&lt;/h2&gt;

&lt;p&gt;At runtime, your application loads the template and injects data into the named table.&lt;br&gt;
Conceptually, the flow is:&lt;br&gt;
Your App -&amp;gt; Template Workbook -&amp;gt; Inject Data -&amp;gt; Final Excel Workbook&lt;/p&gt;

&lt;p&gt;Here’s a complete example.&lt;/p&gt;

&lt;p&gt;Example: Injecting Data into a Template Table&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { WorkbookManager } from "@microsoft/connected-workbooks";

// Method 1: File upload from user
const templateInput = document.querySelector('#template-upload') as HTMLInputElement;
const templateFile = templateInput.files[0];

// Method 2: Fetch from your server
const templateResponse = await fetch('/assets/templates/sales-dashboard.xlsx');
const templateFile = await templateResponse.blob();

// Method 3: Drag and drop
function handleTemplateDrop(event: DragEvent) {
  const templateFile = event.dataTransfer.files[0];
  // Use templateFile with the library
}

const quarterlyData = {
  config: { promoteHeaders: true, adjustColumnNames: true },
  data: [
    ["Region", "Q3_Revenue", "Q4_Revenue", "Growth", "Target_Met"],
    ["North America", 2500000, 2750000, "10%", true],
    ["Europe", 1800000, 2100000, "17%", true],
    ["Asia Pacific", 1200000, 1400000, "17%", true],
    ["Latin America", 800000, 950000, "19%", true]
  ]
};

// Inject data into your branded template
const blob = await workbookManager.generateTableWorkbookFromGrid(
  quarterlyData,
  undefined, // Use template's existing data structure
  {
    templateFile: templateFile,
    TempleteSettings: {
      sheetName: "Dashboard",     // Target worksheet
      tableName: "QuarterlyData"  // Target table name
    }
  }
);

// Users get a fully branded report
workbookManager.openInExcelWeb(blob, "Q4_Executive_Dashboard.xlsx", true);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happens here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The template workbook is loaded as-is&lt;/li&gt;
&lt;li&gt;The quarterlyData table on the Dashboard sheet is replaced with new rows&lt;/li&gt;
&lt;li&gt;All formulas, charts, and formatting remain untouched&lt;/li&gt;
&lt;li&gt;The final workbook opens directly in Excel Online&lt;/li&gt;
&lt;li&gt;No XLSX manipulation, no XML, no fragile formatting code.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real-World Template Scenarios
&lt;/h2&gt;

&lt;p&gt;This approach works especially well for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analytics Dashboards&lt;/li&gt;
&lt;li&gt;Export operational data into Excel dashboards that analysts can customize further.&lt;/li&gt;
&lt;li&gt;Reporting Tools&lt;/li&gt;
&lt;li&gt;Weekly or monthly reports built on templates with preconfigured formulas and summaries.&lt;/li&gt;
&lt;li&gt;Finance &amp;amp; Operations&lt;/li&gt;
&lt;li&gt;Reconciliation workbooks where formulas and validation rules are critical.&lt;/li&gt;
&lt;li&gt;Admin &amp;amp; Internal Systems&lt;/li&gt;
&lt;li&gt;Simple “Export to Excel” buttons that still produce polished, trustworthy reports.
In all of these cases, templates allow Excel to remain the reporting engine, while your app supplies fresh data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practices When Using Templates
&lt;/h2&gt;

&lt;p&gt;A few lessons that help avoid common pitfalls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Version templates alongside your application&lt;/li&gt;
&lt;li&gt;Avoid renaming tables without updating code&lt;/li&gt;
&lt;li&gt;Test template changes during development, not only in production&lt;/li&gt;
&lt;li&gt;Treat templates as part of your system contract.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Export Real Excel Workbooks in JavaScript (Part 2): Using Excel Templates with Connected Workbooks</title>
      <dc:creator>Meni Kroizer</dc:creator>
      <pubDate>Tue, 13 Jan 2026 15:12:06 +0000</pubDate>
      <link>https://dev.to/meni_kroizer_16e2b4506a7e/export-real-excel-workbooks-in-javascript-part-2-using-excel-templates-with-connected-workbooks-44jb</link>
      <guid>https://dev.to/meni_kroizer_16e2b4506a7e/export-real-excel-workbooks-in-javascript-part-2-using-excel-templates-with-connected-workbooks-44jb</guid>
      <description>&lt;p&gt;In &lt;a href="https://dev.to/meni_kroizer_16e2b4506a7e/how-to-export-real-excel-workbooks-in-javascript-using-connected-workbooks-2fkg"&gt;&lt;strong&gt;Part 1&lt;/strong&gt;&lt;/a&gt;, we looked at how to export real Excel workbooks from JavaScript using Connected Workbooks.&lt;br&gt;
In practice, though, most teams don’t want raw tables, they want reports that follow existing Excel templates with charts, formulas, and branding already in place.&lt;br&gt;
This is where Connected Workbooks really starts to shine.&lt;br&gt;
With template-based exports:&lt;/p&gt;

&lt;p&gt;In Excel you defines how the workbook looks,&lt;br&gt;
Your application defines what data goes into it,&lt;br&gt;
Connected Workbooks lets you keep that boundary clean.&lt;/p&gt;
&lt;h2&gt;
  
  
  What an "Excel Template" Means Here
&lt;/h2&gt;

&lt;p&gt;An Excel template, in this context, is simply:&lt;br&gt;
A normal .xlsx file,Created and edited in Excel Containing one or more named tables,&lt;br&gt;
Those tables act as injection points.&lt;/p&gt;

&lt;p&gt;Connected Workbooks does not generate charts, formulas, or formatting. Instead, it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loads the template&lt;/li&gt;
&lt;li&gt;Finds a named table&lt;/li&gt;
&lt;li&gt;Replaces its rows with new data&lt;/li&gt;
&lt;li&gt;Produces a final workbook where everything else stays intact&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because formulas and charts reference tables, they update automatically when the data changes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Preparing an Excel Template (Excel-Side Work)
&lt;/h2&gt;

&lt;p&gt;Before writing any code, you prepare the template in Excel.&lt;br&gt;
A typical flow looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Excel and create a new workbook&lt;/li&gt;
&lt;li&gt;Add a worksheet (for example: Dashboard)&lt;/li&gt;
&lt;li&gt;Insert a table (Ctrl + T)&lt;/li&gt;
&lt;li&gt;Name the table (for example: SalesTable)&lt;/li&gt;
&lt;li&gt;Build formulas, charts, or PivotTables that reference that table in a diffrent sheet&lt;/li&gt;
&lt;li&gt;Apply branding and formatting&lt;/li&gt;
&lt;li&gt;Save the file as .xlsx&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The table name and sheet name are critical this is how your application knows where to inject data.&lt;/p&gt;

&lt;p&gt;From this point on, Excel owns presentation, and your code only supplies rows.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using a Template with Connected Workbooks
&lt;/h2&gt;

&lt;p&gt;At runtime, your application loads the template and injects data into the named table.&lt;br&gt;
Conceptually, the flow is:&lt;br&gt;
Your App -&amp;gt; Template Workbook -&amp;gt; Inject Data -&amp;gt; Final Excel Workbook&lt;/p&gt;

&lt;p&gt;Here’s a complete example.&lt;/p&gt;

&lt;p&gt;Example: Injecting Data into a Template Table&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { WorkbookManager } from "@microsoft/connected-workbooks";

// Method 1: File upload from user
const templateInput = document.querySelector('#template-upload') as HTMLInputElement;
const templateFile = templateInput.files[0];

// Method 2: Fetch from your server
const templateResponse = await fetch('/assets/templates/sales-dashboard.xlsx');
const templateFile = await templateResponse.blob();

// Method 3: Drag and drop
function handleTemplateDrop(event: DragEvent) {
  const templateFile = event.dataTransfer.files[0];
  // Use templateFile with the library
}

const quarterlyData = {
  config: { promoteHeaders: true, adjustColumnNames: true },
  data: [
    ["Region", "Q3_Revenue", "Q4_Revenue", "Growth", "Target_Met"],
    ["North America", 2500000, 2750000, "10%", true],
    ["Europe", 1800000, 2100000, "17%", true],
    ["Asia Pacific", 1200000, 1400000, "17%", true],
    ["Latin America", 800000, 950000, "19%", true]
  ]
};

// Inject data into your branded template
const blob = await workbookManager.generateTableWorkbookFromGrid(
  quarterlyData,
  undefined, // Use template's existing data structure
  {
    templateFile: templateFile,
    TempleteSettings: {
      sheetName: "Dashboard",     // Target worksheet
      tableName: "QuarterlyData"  // Target table name
    }
  }
);

// Users get a fully branded report
workbookManager.openInExcelWeb(blob, "Q4_Executive_Dashboard.xlsx", true);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happens here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The template workbook is loaded as-is&lt;/li&gt;
&lt;li&gt;The quarterlyData table on the Dashboard sheet is replaced with new rows&lt;/li&gt;
&lt;li&gt;All formulas, charts, and formatting remain untouched&lt;/li&gt;
&lt;li&gt;The final workbook opens directly in Excel Online&lt;/li&gt;
&lt;li&gt;No XLSX manipulation, no XML, no fragile formatting code.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Real-World Template Scenarios
&lt;/h2&gt;

&lt;p&gt;This approach works especially well for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Analytics Dashboards&lt;/li&gt;
&lt;li&gt;Export operational data into Excel dashboards that analysts can customize further.&lt;/li&gt;
&lt;li&gt;Reporting Tools&lt;/li&gt;
&lt;li&gt;Weekly or monthly reports built on templates with preconfigured formulas and summaries.&lt;/li&gt;
&lt;li&gt;Finance &amp;amp; Operations&lt;/li&gt;
&lt;li&gt;Reconciliation workbooks where formulas and validation rules are critical.&lt;/li&gt;
&lt;li&gt;Admin &amp;amp; Internal Systems&lt;/li&gt;
&lt;li&gt;Simple “Export to Excel” buttons that still produce polished, trustworthy reports.
In all of these cases, templates allow Excel to remain the reporting engine, while your app supplies fresh data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Best Practices When Using Templates
&lt;/h2&gt;

&lt;p&gt;A few lessons that help avoid common pitfalls:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Version templates alongside your application&lt;/li&gt;
&lt;li&gt;Avoid renaming tables without updating code&lt;/li&gt;
&lt;li&gt;Test template changes during development, not only in production&lt;/li&gt;
&lt;li&gt;Treat templates as part of your system contract.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to Export Real Excel Workbooks in JavaScript Using Connected Workbooks</title>
      <dc:creator>Meni Kroizer</dc:creator>
      <pubDate>Tue, 30 Dec 2025 14:03:24 +0000</pubDate>
      <link>https://dev.to/meni_kroizer_16e2b4506a7e/how-to-export-real-excel-workbooks-in-javascript-using-connected-workbooks-2fkg</link>
      <guid>https://dev.to/meni_kroizer_16e2b4506a7e/how-to-export-real-excel-workbooks-in-javascript-using-connected-workbooks-2fkg</guid>
      <description>&lt;p&gt;if you're exporting data to Excel today, chances are you're generating CSV files or using a basic XLSX utility. Those approaches work—but they hit limits quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSV can’t preserve data types&lt;/li&gt;
&lt;li&gt;No formulas, formatting, or tables&lt;/li&gt;
&lt;li&gt;No Power Query or refresh logic&lt;/li&gt;
&lt;li&gt;No way to integrate with Excel Online
When developers want actual Excel behavior, not just a file with .xlsx at the end, CSV falls short.
That’s where Connected Workbooks comes in.
This guide walks you through what the library is, how it works, and how to use it to export real Excel workbooks directly from your JavaScript or TypeScript application.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  1. Introduction
&lt;/h2&gt;

&lt;p&gt;CSV exports are simple but limited. They can’t express:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rich tables&lt;/li&gt;
&lt;li&gt;Metadata&lt;/li&gt;
&lt;li&gt;Styling&lt;/li&gt;
&lt;li&gt;Reusable worksheets&lt;/li&gt;
&lt;li&gt;Query connections&lt;/li&gt;
&lt;li&gt;Real Excel structures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For teams building dashboards, admin tools, or analytics views, CSV‑only exports become frustrating. What you really want is an Excel workbook that behaves like something produced by Excel—tables, queries, refresh logic, templates.&lt;br&gt;
Connected Workbooks gives you that with a few lines of code.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. What Is Connected Workbooks?
&lt;/h2&gt;

&lt;p&gt;Connected Workbooks is an open-source JavaScript/TypeScript library maintained by Microsoft.&lt;br&gt;
Repo: &lt;a href="https://github.com/microsoft/connected-workbooks" rel="noopener noreferrer"&gt;https://github.com/microsoft/connected-workbooks&lt;/a&gt;&lt;br&gt;
Its purpose is simple:&lt;/p&gt;

&lt;p&gt;Take data in your web or backend application and generate a real Excel (.xlsx) workbook—complete with tables, queries, or templates.&lt;/p&gt;

&lt;p&gt;It acts as a bridge between your app and Excel:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your app provides HTML tables, arrays, grid data, and Power Query query&lt;/li&gt;
&lt;li&gt;Connected Workbooks turns that into structured Excel tables&lt;/li&gt;
&lt;li&gt;Produces a Blob &lt;/li&gt;
&lt;li&gt;You can download it or open it instantly in Excel Online&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes exporting Excel files feel like generating PDFs—simple, declarative, reliable.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. How Connected Workbooks Works
&lt;/h2&gt;

&lt;p&gt;The mental model is straightforward:&lt;br&gt;
Your Application → Connected Workbooks → Excel Workbook (.xlsx)&lt;br&gt;
Data sources you provide&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML &amp;lt;table&amp;gt; elements&lt;/li&gt;
&lt;li&gt;Grid or array data&lt;/li&gt;
&lt;li&gt;Power Query mashups&lt;/li&gt;
&lt;li&gt;Excel templates with named tables&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What the library produces&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Excel tables (not static pasted values)&lt;/li&gt;
&lt;li&gt;Workbooks with sheets, metadata, and table definitions&lt;/li&gt;
&lt;li&gt;Optional Power Query connections&lt;/li&gt;
&lt;li&gt;A final .xlsx Blob/Buffer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Static exports vs. Connected Workbooks&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;CSV/Basic XLSX&lt;/th&gt;
&lt;th&gt;Connected Workbooks&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Raw values&lt;/td&gt;
&lt;td&gt;Real Excel tables&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No metadata&lt;/td&gt;
&lt;td&gt;Column types, names,formats&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No refresh logic&lt;/td&gt;
&lt;td&gt;Optional Power Query refreah&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No structual awareness&lt;/td&gt;
&lt;td&gt;Template, table injection&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h2&gt;
  
  
  4. Installation
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install @microsoft/connected-workbooks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Practical Walkthrough: Exporting an HTML Table
&lt;/h2&gt;

&lt;p&gt;Let’s build the simplest useful example:&lt;br&gt;
Take an existing &amp;lt;table&amp;gt; from the DOM and export it as a real Excel table.&lt;br&gt;
for example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&amp;lt;table id="salesTable"&amp;gt;
  &amp;lt;thead&amp;gt;
    &amp;lt;tr&amp;gt;
      &amp;lt;th&amp;gt;Product&amp;lt;/th&amp;gt;
      &amp;lt;th&amp;gt;Units&amp;lt;/th&amp;gt;
      &amp;lt;th&amp;gt;Revenue&amp;lt;/th&amp;gt;
    &amp;lt;/tr&amp;gt;
  &amp;lt;/thead&amp;gt;
  &amp;lt;tbody&amp;gt;
    &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Keyboard&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;12&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;480&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Mouse&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;18&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;360&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;/tbody&amp;gt;
&amp;lt;/table&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Generate a workbook from that table&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
import { WorkbookManager } from "@microsoft/connected-workbooks";

const workbookManager = new WorkbookManager();

async function exportTable() {
  const tableElement = document.getElementById("salesTable");

  const blob = await workbookManager.generateTableWorkbookFromHtml(tableElement);

  // Option 1 — download locally
  workbookManager.download(blob, "sales.xlsx");

  // Option 2 — open directly in Excel Online
  workbookManager.openInExcelWeb(blob, "sales.xlsx", true);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This instantly gives your users a professional, Excel‑native export—without building any XLSX structures by hand.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real-World Use Cases
&lt;/h2&gt;

&lt;p&gt;Here are places where Connected Workbooks becomes a superpower:&lt;br&gt;
&lt;strong&gt;Analytics dashboards&lt;/strong&gt;&lt;br&gt;
Export charts, tables, and raw data into a workbook analysts can modify.&lt;br&gt;
&lt;strong&gt;Reporting tools&lt;/strong&gt;&lt;br&gt;
Monthly or weekly reports based on templates with prebuilt formulas.&lt;br&gt;
&lt;strong&gt;Admin / internal systems&lt;/strong&gt;&lt;br&gt;
Simple "Export to Excel" buttons that create real Excel tables—not plain CSVs.&lt;br&gt;
These scenarios benefit from structure, formatting, Power Query, or templates.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you’ve outgrown CSV exports or want to give your users a native Excel experience, Connected Workbooks is a practical, developer-friendly option. It keeps your code simple while producing real, structured Excel workbooks that users can trust.&lt;br&gt;
Explore more patterns, examples, and utility functions here:&lt;br&gt;
&lt;a href="https://github.com/microsoft/connected-workbooks" rel="noopener noreferrer"&gt;https://github.com/microsoft/connected-workbooks&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>excel</category>
      <category>export</category>
    </item>
  </channel>
</rss>
