Back to Integrations
SheetXAI logo
CustomJS logo
CustomJS · Excel Integration

How to Connect CustomJS to Excel (4 Methods Compared)

The Problem With Getting Workbook Data In and Out of CustomJS

You have an Excel workbook full of data — HTML report strings, PDF file links, staging environment URLs. You need CustomJS to process them in batch and return results to specific columns. The usual path is to export rows to a script or hit the CustomJS API manually for each one, then paste results back in — and redo the whole thing the next time the list updates.

CustomJS is good at running JavaScript logic, converting HTML to PDF or PNG, merging documents, and executing Puppeteer browser scripts. But bridging an Excel list into CustomJS and receiving outputs back in the right cells isn't built in. You have to construct that connection yourself, and most of that work has nothing to do with the actual processing.

Below are four ways teams handle it. The fourth one is the only one that gets out of your way.

Method 1: Manual Copy-Paste (and CSV Export)

The typical flow for Excel users is to export the relevant column as a CSV, run a script or paste inputs into a CustomJS call, collect the output URLs, and re-import them into the workbook. For twelve PDF merge URLs in order, that's manageable once. For eighty HTML templates with different filenames and output requirements, the export-process-reimport cycle becomes its own job.

The part that accumulates friction isn't the data transfer — it's the reconciliation. When row 23 returns an error, you have to match it back to the original row in the export, fix the input, re-run, and verify the result landed in the right place. The third time you've rebuilt this for a monthly deliverable, the manual path stops feeling like a workflow and starts feeling like a tax.

Method 2: Power Automate

Power Automate can connect to CustomJS. You can trigger on a new row added to a table, call a CustomJS endpoint, and write the response back to the workbook.

Before you go down this road: do you know what a connector action is in Power Automate? A flow trigger? A dynamic content mapping? If those feel like terms you'd have to look up, this is probably not your shortest path to a result. Method 4 will get you there faster.

For those comfortable with Power Automate, the setup is achievable. Authenticate to CustomJS, map the HTML string or URL field from the workbook table, fire the conversion or merge call, parse the response URL, write it back.

The problem is the row-by-row model.

One trigger fire per row means one API call per row. Running eighty HTML-to-PDF conversions through Power Automate means eighty discrete flow executions, eighty entries in the run history, and a debugging experience that doesn't scale when a handful of rows return errors partway through.

You probably just need the PDF download link in column B. You probably have no idea how to wire a Power Automate flow that loops over eighty rows and handles partial failures gracefully — and there's no reason you should. So the request goes to whoever manages your organization's Power Platform environment, and now you're sitting on it until they have a slot. If the deadline's Tuesday, that's a problem.

And when the workbook structure changes — a column rename, a new sheet added — the flow breaks until someone traces through the mappings and fixes them.

Method 3: The Previous Generation — Connector Add-Ons

Until recently, the best option for repeatable Excel ↔ CustomJS workflows was a category of add-ons that let you configure column mappings in a saved template, then run them on demand or on a schedule. You tagged your input column, pointed at your output cell, saved the config, and clicked run.

That was a genuine improvement over exporting and reimporting by hand. Configs persisted, outputs landed consistently, the team didn't reinvent the format each run.

But the template design was still entirely your responsibility. Which column holds the HTML. Which cell gets the result URL. Whether to skip rows with a blank in column C. The add-on executed the job, but you were still the one specifying it in full. And the first time the worksheet added a column or the table schema changed, the saved config broke until someone updated it.

This is the previous generation. It worked. It just asked a lot of the person operating it.

The Easy Way: Using SheetXAI in Excel

There is a different way entirely. SheetXAI is an AI agent that lives inside your Excel workbook. It reads the workbook, understands what you're looking at, and through its built-in CustomJS integration it can run conversions, merges, and Puppeteer scripts for you — across the whole column, in one ask. No template configuration, no automation glue. You just ask.

Example 1: Convert a column of HTML strings to PDFs

Take the HTML content in column A of my Excel sheet and convert each row to a PDF using CustomJS, writing the download URL back to column B — process all 80 rows

SheetXAI processes every populated row in column A, calls the CustomJS HTML-to-PDF endpoint for each one, and writes the download URLs into the corresponding cells in column B.

Example 2: Merge a list of PDF URLs into a single document

Use CustomJS to combine the 12 PDF URLs in column A of my Excel sheet into one merged document in row order and put the result URL in cell B1

The pattern: you describe the range, the ordering requirement, and the destination. SheetXAI handles the rest.

Try It

Get the 7-day free trial of SheetXAI and open any Excel workbook with a column of HTML templates, PDF links, or URLs you need processed, then ask it to run the CustomJS operation across your list. The CustomJS integration is included in every SheetXAI plan.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more