Excel can import web data through Power Query when the connector and authentication method are supported by your Excel platform.
Use From Web for accessible tables, Text/CSV for a reviewed export, and JSON import for a structured file produced by a collection workflow.
Windows desktop instructions should not be assumed to match Excel for Mac or Excel for the web.
Missing rows, changing headers, data-type conversion, and failed refreshes require acceptance checks before a workbook is shared.
Keep API keys outside shared workbooks and separate web collection from spreadsheet transformation when authentication or rendering becomes complex.
Nstdata Crawl can supply approved page content through a Web Crawling API for LLM-ready data; your parser still defines the spreadsheet's business columns.
What Does Web Scraping in Excel Actually Mean?
Web scraping in Excel means acquiring web-derived data and loading it into a workbook for transformation and analysis. Excel may retrieve a supported web resource directly, or it may consume a CSV or JSON file created by another collection tool. Those architectures have different authentication, rendering, and refresh responsibilities.
Power Query is the repeatable import-and-transform layer; a visible worksheet is the presentation layer. A good workflow preserves the source, field types, and update context rather than replacing a report with whatever the latest request happened to return. Nstdata Crawl becomes relevant when acquisition needs managed rendering or site collection before Excel receives the data.
The Power Query overview explains the separation between connecting, transforming, and loading. Start by deciding which stage is failing. A page that does not expose a suitable table requires a different acquisition strategy, not merely a different worksheet formula.
What Do You Need Before You Start?
You need a supported Excel installation, a permitted source, a known table or schema, and a rule for accepting refreshed results. The native instructions below target Excel for Windows with the documented Web connector. Excel for Mac and Excel for the web have different connector and refresh availability; check your product's current features before following a Windows ribbon path.
Experience Nstproxy Crawl - Start Your Free Trial Today
Prepare these details:
Item
What to record
Source
Exact URL or approved local export path
Authentication
Anonymous or the connector-supported account method
Fields
Expected column names and their meanings
Identity
Stable row identifier, not worksheet row number
Types
Identifier as Text; numbers and dates with explicit locale
Acceptance
Required fields, duplicate policy, and expected scope
Refresh
Manual or an explicitly supported schedule
For the Python export method, install requests and beautifulsoup4. For managed acquisition, add an Nstdata account, an API key, Python 3.10 or later, and nstdata-ai-crawl. The managed example needs your credential; it is not a completed authenticated extraction.
How Does the Excel Import Workflow Work?
The Excel import workflow connects to a resource, identifies its records, applies transformations, and loads a table that can be refreshed. Power Query stores a transformation recipe. A refresh reruns that recipe; it is not an automatic historical archive of earlier values.
Separate acquisition from report refresh when the source requires complex browser state. A scheduled collector can write a reviewed export, while Power Query reads only the latest accepted file. This protects a shared workbook from API credentials and avoids presenting a login page or incomplete scrape as new business data. The crawler-to-spreadsheet guide covers the output boundary in more detail.
How Can You Import Web Data into Excel?
You can import web data directly through the Web connector, through a CSV file, or through a validated managed export. Choose the first method for a stable accessible table, the second for a transparent repeatable file, and the third when collection needs rendering or broader scope.
Method 1: Import an accessible table with From Web
Best for: A small public table that the connector recognizes without complex interaction.
Step 1: Open the Web connector
In Excel for Windows, open Data → Get Data → From Other Sources → From Web. Depending on the ribbon layout, Data → From Web may be exposed directly. Use the documented Web connector rather than an older Internet Explorer-based New Web Query tutorial.
Step 2: Enter the table page URL
Choose Basic, enter https://testpages.eviltester.com/pages/basics/html-tag-table/, and select OK. This is a public HTML-table test page; use a similarly permitted source for your own workflow.
Step 3: Choose the authentication method
Select Anonymous for this public example, then select Connect. Authentication applies to the URL level you choose. Use a different method only when the source requires it and your connector supports it.
Step 4: Select the intended table
In Navigator, inspect the table containing Name and Amount, then select Transform Data. Do not rely on a generated table number remaining stable after the source changes.
[Screenshot: Navigator preview showing the Name and Amount table before import.]
Step 5: Load the reviewed query
In Power Query Editor, confirm headers and field types, then select Home → Close & Load. Verify a few source rows in the resulting worksheet. The Web connector instructions document the URL, authentication, Navigator, and transformation steps.
How to verify: Compare the first and last displayed source rows with the loaded table, check the headers, and record the source URL separately from the business columns.
Limit: The connector may not recognize a JavaScript grid, authenticated application state, or layout that differs from the page in your ordinary browser. Connector behavior also depends on the Excel host.
Method 2: Create and import a reviewable CSV
Best for: A repeatable collection process whose output needs to be inspected before workbook refresh.
Step 1: Save a table extractor
Save the following as table_to_csv.py. It retrieves one public demonstration page, checks the expected schema, and writes the selected table. It does not recurse or infer tables from arbitrary div layouts.
import csv
from pathlib import Path
import requests
from bs4 import BeautifulSoup
url ="https://testpages.eviltester.com/pages/basics/html-tag-table/"parts =[]size =0with requests.get(url, timeout=(10,30), stream=True)as response: response.raise_for_status()for part in response.iter_content(65536): size +=len(part)if size >1_048_576:raise RuntimeError("Unexpectedly large demonstration page") parts.append(part)table = BeautifulSoup(b"".join(parts),"html.parser").select_one("table#mytable")if table isNone:raise RuntimeError("Expected demonstration table was not found")rows =[[cell.get_text(" ", strip=True)for cell in row.find_all(["th","td"])]for row in table.find_all("tr")]ifnot rows or rows[0]!=["Name","Amount"]:raise RuntimeError("Unexpected table headers")iflen(rows)<2orany(len(row)!=2for row in rows):raise RuntimeError("Empty or inconsistent table")ifany(cell.lstrip().startswith(("=","+","-","@"))for row in rows for cell in row):raise RuntimeError("Formula-like value requires review before CSV export")with Path("table-data.csv").open("w", newline="", encoding="utf-8-sig")asfile: csv.writer(file).writerows(rows)print(f"Saved {len(rows)-1} rows to table-data.csv; source: {url}")
Step 2: Run the extractor
Run python table_to_csv.py in the directory where the script is saved. Inspect the reported row count and open table-data.csv as text to confirm the two columns. A changed schema should stop the export rather than produce a plausible but incorrect worksheet.
Step 3: Open the CSV import dialog
In Excel for Windows, choose Data → Get Data → From File → From Text/CSV and select table-data.csv. Set UTF-8 encoding if it is not detected correctly.
Step 4: Review column types
Select Transform Data, review Name as Text and Amount as a decimal number using the appropriate locale, and then load the result. For your own dataset, retain identifiers as Text to avoid losing leading zeros or changing long identifiers into numeric values.
How to verify: Reconcile the CSV record count with the loaded rows and compare a small sample of values. Preserve an accepted export before replacing it during a later run.
Limit: This extractor reads the initial HTML response. It does not execute JavaScript, click pagination, or authenticate to a private application. A CSV is a delivery file, not a scheduler or a permission grant.
Method 3: Collect with Nstdata Crawl before loading Excel
Best for: Approved sources that need managed page retrieval, rendering, or controlled site discovery before spreadsheet transformation.
Step 1: Prepare the managed collection request
Obtain your key through Dashboard → Crawl Playground, install nstdata-ai-crawl, and set NSTDATA_API_TOKEN plus APPROVED_PAGE_URL. Choose one representative permitted page and list the text or fields that must survive extraction.
Step 2: Retrieve a checked page sample
Run this credential-dependent example to save Markdown. Use it for inspection or later extraction; Markdown is not automatically the tabular schema that Excel needs.
import os
from pathlib import Path
from nstdata_ai_crawl import NstDataClient, ScrapeRequestDto
token = os.environ["NSTDATA_API_TOKEN"]url = os.environ["APPROVED_PAGE_URL"]with NstDataClient(token, max_response_bytes=1_048_576)as client: result = client.submit_scrape_task_sync(ScrapeRequestDto( url=url, formats=["markdown"], onlyMainContent=True, timeout=60000))if result.success isnotTrueor result.status !="completed":raise RuntimeError("Page task did not complete successfully")if result.data isNoneor result.data.truncated isTrue:raise RuntimeError("Missing or partial output needs review") markdown = result.data.get_markdown()ifnot markdown ornot markdown.strip():raise RuntimeError("No usable Markdown was returned") expected = os.environ.get("EXPECTED_TEXT")if expected and expected notin markdown:raise RuntimeError("Required source text is missing") Path("page.md").write_text(markdown, encoding="utf-8")print("Saved page.md; validate source facts before accepting records")
Step 3: Produce the business export
Parse the returned representation into your required columns using rules appropriate to the source. For a known HTML table, request HTML and apply a tested parser; for model-assisted extraction, require source evidence and validate the proposed fields. Apply structured extraction checks before writing accepted rows to CSV or JSON, retaining source_url and observed_at.
Step 4: Import the accepted file
Load CSV through Data → Get Data → From File → From Text/CSV, or JSON through Data → Get Data → From File → From JSON on an Excel version supporting that connector. Expand only the required JSON record fields. The Json.Document reference describes JSON parsing; parsing an object does not validate its business meaning.
How to verify: Reconcile accepted records, source URLs, and the refresh timestamp before refreshing the shared report. Preserve the previous accepted export when collection fails.
Limit: Collection, parsing, and Excel refresh are distinct jobs. Nstdata does not make arbitrary pages become correct spreadsheet rows without a field contract and validation.
Where Does Nstdata Crawl Help an Excel Workflow?
Nstdata Crawl helps when the workbook should consume dependable exports while another layer handles website acquisition. It is a Web Crawling API for LLM-ready data that can turn approved site sections into reusable page outputs. Site discovery and recursive crawling support broader collection with explicit limits. JavaScript rendering addresses content that static HTTP cannot observe, while alternate formats help diagnose missing rows. Excel remains responsible for supported imports and transformations, and your application remains responsible for the business schema.
Multiple output roles: Markdown supports AI-assisted interpretation, HTML supports table parsing, links support scoped discovery, JSON-facing output supports integration, and PDF or screenshots support visual review.
Built-in proxies: Standard managed requests can use Nstdata's integrated proxy routing, so there is no separate proxy Host, Port, Username, Password, or Protocol to insert into the workbook.
Accountable operation: Preserve task outcomes and accepted export counts, and include proxy traffic in the Crawl usage budget.
Why Does an Excel Web Import Fail or Return the Wrong Rows?
Excel web imports fail when the connector cannot access the expected resource or the source no longer matches the saved query. Diagnose the failed stage before changing the worksheet.
Symptom
Likely cause
Repair
No expected table in Navigator
JavaScript grid or changed markup
Use a permitted structured source or a separate collector
Preview contains a sign-in page
Wrong authentication scope or unavailable session
Review connector credentials and source permissions
Header errors after refresh
Column names changed
Inspect the source and update the field contract
Numbers are wrong
Locale or automatic type conversion
Set explicit types and locale in Power Query
Old values remain visible
Refresh failed or was not run
Check query status and display the accepted observation time
Duplicate business records
Pagination overlap or missing identifiers
Deduplicate by stable source identity before loading
Treat cell text from websites as untrusted data. The OWASP CSV injection guidance explains why formula-like values need review before spreadsheet consumption. Also minimize personal data and verify source terms before recurring collection.
How Should You Put the Workbook into Regular Use?
Put the workbook into regular use only after a small import reconciles against the source and a failed refresh leaves the last accepted dataset available. Display the dataset's observation time, keep credentials outside shared files, and document who maintains the parser. Follow bounded retry rules for collection failures. Nstdata's HTML and visual outputs can help investigate changes before they reach a shared report.
Q: Does From Web work identically on Windows, Mac, and the web?
No. Connector availability, interface paths, authentication, and refresh support differ by Excel product and deployment.
Q: Can I scrape any JavaScript page directly in Excel?
No. Browser visibility does not guarantee that the connector observes the same state or exposes a suitable table. Use a supported source or a separate authorized collection layer when necessary.
Q: Should I paste an API key into a shared workbook?
No. Keep collection credentials in a controlled service or secret store and share only the accepted export whenever possible.
Q: Does CSV preserve Excel column types?
No. CSV stores text fields and separators, so import settings must preserve identifiers, dates, and numeric interpretation.
Q: Does Refresh All create a historical archive?
No. Refresh reruns queries and updates their destinations. Store dated accepted exports separately when history matters.
Q: Does Nstdata Crawl directly validate spreadsheet business fields?
No. Nstdata Crawl provides page acquisition and representations; your parser and acceptance rules establish whether the spreadsheet fields are correct.
Ivy Lin
Nov. 10th 2026
Crawl entire websites with a single API request
99.8% success rate with JavaScript rendering
Get clean, LLM-ready data in multiple formats
Turn any website into Markdown, HTML, JSON, links, PDFs and more — without managing crawling infrastructure.