MoreRSS

site iconThe Practical DeveloperModify

A constructive and inclusive social network for software developers.
Please copy the RSS to your reader, or quickly subscribe to:

Inoreader Feedly Follow Feedbin Local Reader

Rss preview of Blog of The Practical Developer

JSON to Excel Add-in - Seamless Integration Within Excel

2026-01-17 11:09:43

Welcome to part 3 of our JSON to Excel series! So far, we've covered the introduction to JSON to Excel and the Web App. Today, we're exploring the Excel Add-in - the perfect solution for users who spend their days working in Excel and want to convert JSON data without leaving their familiar environment.

Why Use the Excel Add-in?

The JSON to Excel Excel Add-in is designed for power users who live in Excel. Here's why it might be the perfect choice for you:

  • Seamless Integration: Works directly within Excel - no switching between applications
  • One-Click Conversion: Convert JSON with a single button click
  • Automatic Sheet Creation: Results appear as new sheets in your workbook
  • Familiar Interface: No learning curve if you already know Excel
  • Works Everywhere: Compatible with Excel 2013+, Excel Online, and Office 365

Documentation: https://json-to-excel.wtsolutions.cn/

System Requirements

Before installing, ensure your system meets these requirements:

  • Excel 2013 Service Pack 1 or later
  • Excel 2016 for Mac
  • Excel 2016 or later
  • Excel Online
  • Office 365

Installing the Excel Add-in

Step-by-Step Installation

  1. Open Excel: Launch Excel 2013, 2016, or Excel Online
  2. Navigate to Add-ins: Go to either the Home tab or Insert tab
  3. Search for Add-ins: Click on "Add-ins" and search for "JSON to Excel"
  4. Install: Follow the on-screen instructions to install the add-in
  5. Locate the Button: You'll see a "Convert" button with the JSON to Excel logo in your Home tab

That's it! The add-in is now ready to use.

Video Guide

For visual learners, check out this installation guide:

Watch the installation video

Using the Excel Add-in

Basic Workflow

Once installed, using the add-in is straightforward:

  1. Open the Add-in: Go to Home tab > JSON to Excel > Convert
  2. Prepare Your Data: Choose how to load your JSON:
    • Copy and paste JSON data into the text area
    • Click "Load JSON File(s)" to select files from your computer (up to 20 files with Pro)
  3. Configure Settings: Set your conversion preferences:
    • Conversion Mode (Flat or Nested)
    • Nested Delimiter (Pro feature)
    • Max Depth (Pro feature)
  4. Convert: Click the "Go" button
  5. View Results: Your converted data appears as a new sheet in your workbook

Video Tutorial

Watch this step-by-step usage guide:

Watch the usage video

Advanced Features

Batch Processing (Pro Feature)

One of the most powerful features of the Excel Add-in is batch processing. Instead of converting files one at a time, you can:

  1. Click "Load JSON File(s)"
  2. Select multiple JSON files (up to 20)
  3. Convert all files at once
  4. Each file becomes a separate sheet in your workbook

This is perfect when you have:

  • Daily reports in JSON format
  • Multiple API responses to process
  • Historical data stored as JSON files

Custom Conversion Settings

The Excel Add-in supports the same powerful conversion options as the Web App:

Conversion Mode

  • Flat JSON Mode: For simple, non-nested structures
  • Nested JSON Mode: For complex, hierarchical data

Nested Delimiter (Pro)

Choose how nested properties are named:

  • Dot (.) - Default: user.name
  • Underscore (_): user_name
  • Double Underscore (): `username`
  • Forward Slash (/): user/name

Max Depth (Pro)

Control how deep nested objects are processed:

  • Unlimited (default)
  • 1-20 levels

Practical Use Cases

Use Case 1: API Response Analysis

You're working with an API that returns JSON data about sales:

[
  {
    "id": 1,
    "product": "Widget A",
    "sales": 150,
    "region": "North"
  },
  {
    "id": 2,
    "product": "Widget B",
    "sales": 200,
    "region": "South"
  }
]

Steps:

  1. Copy the JSON response
  2. Open the Excel Add-in
  3. Paste the JSON
  4. Select Flat JSON Mode
  5. Click "Go"
  6. Analyze the data using Excel's built-in tools

Use Case 2: Nested Customer Data

You have customer data with nested contact information:

[
  {
    "customerId": "C001",
    "name": "John Doe",
    "contact": {
      "email": "[email protected]",
      "phone": "555-1234",
      "address": {
        "street": "123 Main St",
        "city": "New York",
        "zip": "10001"
      }
    }
  }
]

Steps:

  1. Copy the JSON
  2. Open the Excel Add-in
  3. Select Nested JSON Mode
  4. Choose dot delimiter
  5. Set Max Depth to 3
  6. Click "Go"
  7. Get columns like: customerId, name, contact.email, contact.phone, contact.address.street, contact.address.city, contact.address.zip

Use Case 3: Daily Report Processing

You receive daily sales reports as JSON files. Instead of opening each file separately:

  1. Collect all JSON files in a folder
  2. Open the Excel Add-in
  3. Click "Load JSON File(s)"
  4. Select all files (up to 20)
  5. Click "Go"
  6. Review the conversion report
  7. Analyze all data in one workbook

Tips for Excel Add-in Users

Organize Your Workbook

  • Create a dedicated workbook for JSON conversions
  • Use descriptive sheet names after conversion
  • Keep original JSON data in a separate sheet for reference

Combine with Excel Features

  • Use Excel's Pivot Tables to analyze converted JSON data
  • Apply conditional formatting to highlight key metrics
  • Use formulas to calculate derived fields
  • Create charts and graphs from your JSON data

Keyboard Shortcuts

After installation, you can access the add-in quickly:

  • Add the "Convert" button to your Quick Access Toolbar
  • Create custom keyboard shortcuts for frequently used actions

Limitations

Keep these limitations in mind:

  • Maximum 1000 objects (rows) per conversion
  • Maximum 100 unique properties (columns) per dataset
  • Arrays in values are converted to strings
  • Maximum 20 files per batch conversion (Pro feature)

Troubleshooting

Add-in Not Appearing

  • Ensure you're using a supported Excel version
  • Check that the add-in is enabled in File > Options > Add-ins
  • Try restarting Excel

Conversion Errors

  • Verify your JSON is valid using the preview
  • Check that you're not exceeding the row/column limits
  • Ensure nested structures are properly formatted

Performance Issues

  • Large files may take longer to process
  • Consider breaking very large JSON files into smaller chunks
  • Close other Excel workbooks to free up memory

When to Use the Excel Add-in vs Web App

Choose the Excel Add-in when:

  • You work primarily in Excel
  • You need to analyze data immediately after conversion
  • You want to integrate JSON conversion into your Excel workflows
  • You prefer a desktop application experience

Choose the Web App when:

  • You need to convert files quickly without installation
  • You're working on a device without Excel
  • You want to share the conversion process with others
  • You only need occasional conversions

Next Steps

Now that you're comfortable with the Excel Add-in, you might be interested in exploring other integration options. In our next post, we'll cover the WPS Add-in for users who prefer WPS Office over Microsoft Excel.

Ready to install the Excel Add-in? Open Excel and search for "JSON to Excel" in the Add-ins store today!

MdBin Levels Up: From Custom Markdown Pipeline to Streamdown

2026-01-17 11:08:59

The Evolution Continues

A few weeks ago, I introduced MdBin—a free utility for sharing beautifully rendered markdown. The response was incredible, and people were using it exactly how I'd hoped: sharing LLM outputs, documentation snippets, and formatted notes without the friction of paywalls or mangled formatting.

But here's the thing about building in public: you never stop iterating.

Today I'm excited to share a significant upgrade under the hood—migrating from a custom markdown-it + Shiki pipeline to Streamdown, Vercel's new drop-in replacement for react-markdown.

The Old Setup: It Worked, But

My original implementation was solid. I used markdown-it-async with @shikijs/markdown-it for syntax highlighting:

import { fromAsyncCodeToHtml } from '@shikijs/markdown-it/async'
import MarkdownItAsync from 'markdown-it-async'
import { codeToHtml } from 'shiki'

const md = MarkdownItAsync({
  html: true,
  xhtmlOut: true,
  linkify: true,
  typographer: true,
  breaks: true,
})

md.use(
  fromAsyncCodeToHtml(codeToHtml, {
    themes: {
      light: 'github-light',
      dark: 'github-dark',
    },
    defaultColor: false,
    cssVariablePrefix: '--shiki-',
  })
)

export async function renderMarkdown(content: string): Promise<string> {
  const html = await md.renderAsync(content)
  return html
}

Then in my page component, I'd render with the classic dangerouslySetInnerHTML:

<article
  className="markdown-content"
  dangerouslySetInnerHTML={{ __html: renderedContent }}
/>

This approach had several drawbacks:

  1. Manual security handlingdangerouslySetInnerHTML is exactly what it sounds like
  2. No built-in controls — I had to build copy buttons, download functionality myself
  3. Mermaid was a nightmare — SSR rendering just didn't work reliably
  4. Bundle size creep — Every language highlight added weight
  5. Incomplete block handling — Malformed markdown could break the entire render

Enter Streamdown

When I discovered Streamdown, I initially dismissed it. "It's for AI streaming," I thought. "MdBin renders static content SSR."

But then I looked closer at the feature set:

  • 🎯 Code syntax highlighting with Shiki (what I was already using)
  • 📈 Mermaid diagrams that actually work SSR
  • 🛡️ Security-first with rehype-harden
  • 📊 GitHub Flavored Markdown out of the box
  • 🔢 Math rendering via KaTeX
  • Built-in controls for copy, download, fullscreen

Wait. This is exactly what a markdown sharing tool needs.

The Migration: Surprisingly Painless

Here's what the new implementation looks like:

import { Streamdown } from 'streamdown'

export default async function PastePage({ params }) {
  const { id } = await params
  const { decompressedContent, createdAt } = await cachedGetPaste(id)

  return (
    <Streamdown
      className="markdown-content"
      parseIncompleteMarkdown
      shikiTheme={['github-light', 'github-dark']}
      mode="streaming"
      isAnimating={false}
      controls={{
        table: true,
        code: true,
        mermaid: {
          download: true,
          copy: true,
          fullscreen: true,
          panZoom: true,
        },
      }}
    >
      {decompressedContent}
    </Streamdown>
  )
}

That's it. No separate render function. No dangerouslySetInnerHTML. No manual security sanitization.

The Tailwind setup is one line in globals.css:

@source "../../node_modules/streamdown/dist/index.js";

Why v2.0.0 is a Game Changer

The timing couldn't have been better. Streamdown just shipped v2.0.0 with some massive improvements:

🚀 98% Bundle Size Reduction via CDN

This was the big one. Previously, bundling all those Shiki language grammars and themes bloated your build. Now, language-specific highlighting and KaTeX CSS are loaded from their CDN on-demand.

Your build stays lean. Users only fetch what they need.

📈 Mermaid SSR Actually Works

This was a blocker for me before. Mermaid diagrams in markdown are incredibly useful—flowcharts, sequence diagrams, architecture docs—but SSR rendering was broken. Now it works beautifully, with viewport-based lazy loading that prevents page freezing when you have multiple diagrams.

🛡️ Enhanced Security

rehype-harden + rehype-sanitize means I don't have to worry about XSS attacks from malicious markdown. The component handles sanitization automatically.

✨ Built-in UX Polish

All those controls I would have had to build myself? Built-in:

  • Code blocks: Copy button, language indicator
  • Tables: Download as CSV
  • Mermaid: Download as PNG, copy SVG, fullscreen view with pan/zoom

What I Gained

Feature Before After
Security Manual with dangerouslySetInnerHTML Built-in rehype-harden
Code copy Custom CopyButton component ✅ Built-in
Mermaid SSR ❌ Broken ✅ Works
Table download ❌ Not implemented ✅ Built-in
Math rendering ❌ Not implemented ✅ KaTeX built-in
Bundle size Growing with each language CDN-loaded on demand
Incomplete markdown Could break render Graceful handling

The "Streaming" Part

You might wonder: "Why use a streaming-optimized library for static content?"

Fair question. The mode="streaming" and isAnimating={false} props tell Streamdown this is pre-rendered content—no typing effects, no progressive reveal. But all the other benefits still apply:

  • parseIncompleteMarkdown: Handles edge cases where users paste malformed markdown (unclosed code blocks, incomplete tables). Instead of crashing or showing garbage, it renders gracefully.
  • Memoized rendering: Even without streaming, the performance optimizations help with re-renders.

Shoutout to the Vercel Team

The Streamdown team has done an incredible job packaging what could have been a complex, multi-library setup into a single, well-designed component. It powers their AI Elements Message component, but it's genuinely useful for any markdown rendering use case.

The documentation is solid, the defaults are sensible, and it just works.

Try It Out

Head over to mdbin.sivaramp.com and paste some markdown. Try:

  • Code blocks in any language—notice the copy button and language badge
  • Mermaid diagrams—they actually render now! Try the fullscreen + pan/zoom
  • Tables—check out the download button
  • Math equations—LaTeX just works

Here's a quick Mermaid example to paste:

graph TD
    A[Paste Markdown] --> B[Streamdown Renders]
    B --> C{What type?}
    C -->|Code| D[Shiki Highlighting]
    C -->|Diagram| E[Mermaid SVG]
    C -->|Math| F[KaTeX Render]
    D --> G[Beautiful Output]
    E --> G
    F --> G

What's Next

With the rendering layer now handled by Streamdown, I can focus on features users actually want:

  • Expiration options — 1 hour, 1 day, 1 week, or permanent
  • Password protection — For sensitive content
  • Edit links — Update pastes without creating new ones
  • Custom themes — Beyond light/dark mode

The foundation is solid. Now it's time to build.

TL;DR: Migrated MdBin from markdown-it + Shiki to Vercel's Streamdown. Got built-in code copy, Mermaid rendering (that actually works SSR!), math support, enhanced security, and a 98% smaller bundle—all from one component. The Vercel team knocked it out of the park with this one.

Check out the upgrade at mdbin.sivaramp.com and the Streamdown repo.

Getting Started with JSON to Excel Web App - Convert in Seconds

2026-01-17 11:05:48

Welcome back to our JSON to Excel series! In our previous post, we introduced the JSON to Excel toolkit and its various components. Today, we're diving into the quickest and easiest way to convert JSON to Excel: the Web App.

Why Use the Web App?

The JSON to Excel Web App is perfect when you need to convert JSON files quickly without installing any software. Here's why it's ideal:

  • No Installation Required: Works directly in your browser
  • Cross-Platform: Compatible with Windows, Mac, Linux, Android, and iOS
  • Instant Access: Start converting immediately
  • Privacy-Friendly: All processing happens client-side in your browser
  • Batch Processing: Convert multiple files at once (Pro feature)

Getting Started in 3 Simple Steps

Step 1: Open the Web App

Simply open your web browser (Chrome, Firefox, Safari, Edge, or any modern browser) and navigate to:

https://s.wtsolutions.cn/json-to-excel.html

That's it! No registration, no login, no installation. The app loads instantly and you're ready to go.

Step 2: Prepare Your JSON Data

You have three ways to load your JSON data:

Option A: Copy and Paste

The simplest method - just copy your JSON data and paste it directly into the text area provided. You'll see a live preview of your JSON below the text area, so you can verify the data before conversion.

Option B: Load Local Files

Click the "Load JSON File(s)" button to select JSON files from your computer. With the Pro version, you can load up to 20 files at once for batch processing. Each file will be converted to a separate sheet in your Excel file.

Option C: Load from Web URLs (Pro Feature)

For Pro users, you can also load JSON files directly from web URLs. This is perfect when you have JSON data hosted online and want to convert it without downloading first. You can load up to 20 URLs at once.

Step 3: Configure and Convert

Before converting, you can customize the conversion settings:

Conversion Mode

Choose between:

  • Flat JSON Mode: Best for simple JSON without nested structures
  • Nested JSON Mode: Perfect for complex JSON with nested objects

Nested Delimiter (Pro Feature)

When using Nested JSON Mode, you can choose how nested properties are separated:

  • Dot (.): Default - e.g., user.name
  • Underscore (_): e.g., user_name
  • Double Underscore (__): e.g., user__name
  • Forward Slash (/): e.g., user/name

Max Depth (Pro Feature)

Control how deep the converter processes nested objects:

  • Unlimited: Default - processes all levels
  • 1-20: Set a specific depth limit

Once your settings are configured, click the "Go" button and watch the magic happen!

Understanding the Output

After conversion, you'll see:

  1. Live Preview: A preview of your Excel data appears at the bottom of the page
  2. Download Button: Click to download your Excel file
  3. Conversion Report: For batch conversions, you'll see a detailed report showing:
    • Filename or URL
    • Conversion status (success/failure)
    • Sheet name (if successful)
    • Error message (if failed)

A Practical Example

Let's walk through converting a simple JSON array:

[
  {
    "id": 1,
    "name": "John Doe",
    "email": "[email protected]",
    "age": 30
  },
  {
    "id": 2,
    "name": "Jane Smith",
    "email": "[email protected]",
    "age": 25
  }
]

Steps:

  1. Copy the JSON above
  2. Paste it into the Web App text area
  3. Select "Flat JSON Mode" (since this is a simple structure)
  4. Click "Go"
  5. Preview your Excel data
  6. Click "Download"

That's it! You now have an Excel file with your JSON data perfectly formatted.

Tips for Best Results

Validate Your JSON First

The Web App includes a JSON preview that helps you verify your data is properly formatted before conversion. Look out for:

  • Proper brackets and braces
  • Correct comma placement
  • Valid data types

Handle Nested Structures

If your JSON has nested objects, use "Nested JSON Mode" for better results. For example:

[
  {
    "name": "John",
    "contact": {
      "email": "[email protected]",
      "phone": "123-456-7890"
    }
  }
]

With Nested JSON Mode and dot delimiter, this becomes:
| name | contact.email | contact.phone |
|------|----------------|---------------|
| John | [email protected] | 123-456-7890 |

Batch Processing Workflows

For multiple JSON files:

  1. Organize your files in a folder
  2. Use "Load JSON File(s)" to select multiple files
  3. Review the conversion report
  4. Download the combined Excel file with separate sheets for each JSON file

Limitations to Keep in Mind

The Web App has some limitations:

  • Maximum 1000 objects (rows) per conversion
  • Maximum 100 unique properties (columns) per dataset
  • Arrays in values are converted to strings
  • Maximum 20 files per batch conversion (Pro feature)

When to Upgrade to Pro

The free version is perfect for occasional use with simple JSON structures. Consider upgrading to Pro if you:

  • Need to convert more than 1000 rows at once
  • Work with complex nested JSON structures
  • Require batch processing of multiple files
  • Want to load JSON from web URLs
  • Need custom delimiters or depth control
  • Prefer an ad-free experience

Next Steps

Now that you've mastered the Web App, you might be wondering about other ways to use JSON to Excel. In our next post, we'll explore the Excel Add-in, which provides seamless integration directly within Excel - perfect for users who work in Excel all day.

Ready to try the Web App? Visit https://s.wtsolutions.cn/json-to-excel.html and start converting your JSON files today!

GHSA-GW32-9RMW-QWWW: Svelte SSR XSS: The Textarea Trap

2026-01-17 11:03:31

Svelte SSR XSS: The Textarea Trap

Vulnerability ID: GHSA-GW32-9RMW-QWWW
CVSS Score: 8.4
Published: 2026-01-16

A high-severity Cross-Site Scripting (XSS) vulnerability exists in Svelte's Server-Side Rendering (SSR) compiler. Due to improper escaping of bind:value directives on <textarea> elements, attackers can break out of the HTML tag context and execute arbitrary JavaScript.

TL;DR

Svelte's SSR compiler forgot that <textarea> contents are children, not attributes. It didn't escape bind:value content during server-side rendering. Attackers can inject </textarea> to close the tag early and run scripts. Fixed in 3.59.2.

⚠️ Exploit Status: POC

Technical Details

  • CWE ID: CWE-79
  • CVSS Score: 8.4 (High)
  • Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:L/VA:N/SC:H/SI:H/SA:N
  • Attack Vector: Network
  • Vulnerability Type: XSS (Cross-Site Scripting)
  • Affected Component: SSR Compiler (Textarea Handler)

Affected Systems

  • Svelte Framework (SSR Mode)
  • SvelteKit applications using Svelte < 3.59.2
  • svelte: >= 3.0.0 < 3.59.2 (Fixed in: 3.59.2)

Code Analysis

Commit: a31dec5

fix: escape textarea children during SSR

@@ -149,7 +149,7 @@ export default function (node: Element, renderer: Renderer, options: RenderOptio
            // value = name === 'textContent' ? x`@escape($$value)` : x`$$value`;
        } else if (binding.name === 'value' && node.name === 'textarea') {
            const snippet = expression.node;
-           node_contents = x`${snippet} || ""`;
+           node_contents = x`@escape(${snippet} || "")`;
        } else if (binding.name === 'value' && node.name === 'select') {

Exploit Details

Mitigation Strategies

  • Update Svelte to version 3.59.2 or later.
  • Use Svelte 4.0.0+ which includes the fix by default.
  • Avoid using bind:value on textareas with untrusted input in SSR mode if patching is impossible.

Remediation Steps:

  1. Check your package.json for svelte version.
  2. Run npm install svelte@latest or yarn upgrade svelte.
  3. Verify the installed version is >= 3.59.2 using npm list svelte.
  4. Rebuild and redeploy your application to ensure the compiler generates the safe code.

References

Read the full report for GHSA-GW32-9RMW-QWWW on our website for more details including interactive diagrams and full exploit analysis.

Building Blackjack for the Terminal: My First Python Project

2026-01-17 10:43:58

Introduction: The "Why"

For my latest programming assignment from Codecademy, I decided to build a Terminal-Blackjack game. I chose this project because I wanted to practice translating real-world rules (like the complex logic of an Ace being either 1 or 11) into clean, functional Python code.

My goal was to create a game that felt interactive and "smart" enough to play against a dealer, all within a simple text-based interface.

The Game in Action

Here is a look at the gameplay loop, showing the deck shuffling, the deal, and the logic behind hitting and standing:

Alt Text

Behind the Code

This project was a great way to dive deeper into Python's core features. Here are a few technical highlights from the build:

  • Data Structures: I used a Dictionary to map card ranks (like 'J', 'Q', 'K') to their numeric values. This made it easy to efficiently calculate hand totals.
  • The Shuffle: To ensure every game is different, I used Python’s random module. This replicates a real deck being mixed before it is dealt.
  • Game Logic & Loops: The core of the game is a while loop that keeps the "Hit or Stand" phase active until the player either stops or "busts" (goes over 21).
  • Dynamic Aces: One of the trickiest parts was the Ace logic. I implemented logic to check whether a hand exceeds 21 and automatically adjust an Ace's value from 11 to 1 if necessary.

Check Out the Source Code

You can explore the full logic, including how I handled the dealer's AI and the game flow, on my GitHub:

View Terminal-Blackjack on GitHub

Conclusion

Building this game taught me that the hardest part of coding isn't just writing syntax, it's planning for every possible user decision. Seeing the logic come together to successfully crown a winner (or bust a player!) was incredibly satisfying.

I'm looking forward to adding more features, like a save feature or a "shoe" to support multiple decks, in the future!

BrainRunner (1m)

2026-01-17 10:34:29

Check out this Pen I made!