Export Tweets to Excel in 2026: Archive or Power Query
Two ways to export tweets to Excel: your own X archive as a CSV, or any public account through Power Query, with every 19-digit post id kept intact.
Tarun Khatri
Published · Updated · 7 min read
To export tweets to Excel, turn your X archive into a CSV, or load any public account's posts with Power Query.
This guide is for you if you want X (Twitter) posts in a spreadsheet without writing a script. You get both routes, the setting that saves your post ids, and a query we tested. We run Weir, the API the query calls.
In Excel for Windows, paste this into a blank query, as Step 3 shows, and add your key:
let
Key = "weir_live_paste_your_key_here",
Body = Json.FromValue([fromUsers = {"msexcel"}, limit = 20]),
Headers = [Authorization = "Bearer " & Key, #"Content-Type" = "application/json"],
Response = Web.Contents("https://api.weirapp.io/v1/x/search", [Headers = Headers, Content = Body])
in
Json.Document(Response)[data]
- Pick a routeYour own archive, or any public account by API.
- Save the archive as a CSVOur viewer reads the ZIP in your browser.
- Load the CSV as textFrom Text/CSV, with id set to Text.
- Paste the queryA blank query calls Weir's search.
- Load and refreshClose & Load, then Refresh All.
Which way to export tweets to Excel?
Pick by whose Twitter data you need in Excel. Here are the routes as of October 2026:
| Route | Whose posts | Cost | Excel |
|---|---|---|---|
| X archive + our viewer | Only yours | Free | Any recent version |
| Power Query + Weir | Any public account | 1 credit a call + 1 per post | Windows, 2016 and later |
| Official X API + your own code | Any public account | $0.005 per post read | Any, through a CSV |
The archive is free, but it holds only your own account.
For anyone else, you need an API, and Power Query can call one from inside Excel.
Step 1: Export your own tweets from your X archive
Request the archive in the X app under Settings and privacy, then Account, then Your X data.
X's Help Center says it "may take a few days," and you get a ZIP file.
Drop the ZIP on our free Twitter Archive Viewer and select Download CSV. It reads the file inside your browser, so nothing is uploaded.
That's your tweets as a CSV for Excel, with 12 columns from id and text to likes and url. Our guide to opening your Twitter archive explains the rest of the ZIP.
Step 2: Load the CSV into Excel with ids as text
Don't double-click the CSV, or Excel turns every post id into a rounded number.
Import it with Power Query instead, as Microsoft's support page on long numbers shows. This works in Excel 2016 and later on Windows:
- Select Data > From Text/CSV, pick the file, then select Transform Data.
- Select the
idandreply_to_idcolumns, then Home > Transform > Data Type > Text. - Choose Replace current, then select Close & Load.
On Excel for Microsoft 365 or Excel 2024, one setting also fixes double-clicking.
Go to File > Options > Data > Automatic Data Conversion and clear Keep the first 15 digits of long numbers and display in scientific notation if required. Microsoft says Excel then keeps those numbers as text, with every digit. On a Mac, the option sits under Excel > Preferences > Edit.
Step 3: Import tweets into Excel from any public account
Power Query can call a web API, so it reads any public account or search with no archive.
You need Excel for Windows and a free Weir key, with 5,000 credits a month and no card.
Microsoft's list of Power Query sources for Excel for Mac has no Web source.
- Select Data > Get Data > From Other Sources > Blank Query.
- Select View > Advanced Editor, and replace what's there with the query below.
- Put in your key and the account, then select Done.
- If Excel asks how to connect, choose Anonymous. Microsoft's Web connector page says POST requests "can only be made anonymously," and your key rides in the header.
let
Key = "weir_live_paste_your_key_here",
Body = [fromUsers = {"msexcel"}, query = "-filter:nativeretweets", limit = 20],
MaxPages = 5,
Ask = (cursor) => Json.Document(Web.Contents("https://api.weirapp.io/v1/x/search", [
Headers = [Authorization = "Bearer " & Key, #"Content-Type" = "application/json"],
Content = Json.FromValue(if cursor = null then Body else Record.AddField(Body, "cursor", cursor))])),
Pages = List.Generate(() => [Page = Ask(null), N = 1], each [Page] <> null,
each if [Page][meta][nextCursor] = null or [N] = MaxPages then [Page = null, N = [N]]
else [Page = Ask([Page][meta][nextCursor]), N = [N] + 1], each [Page][data]),
Rows = List.Transform(List.Combine(Pages), (p) => [id = p[id], createdAt = p[createdAt],
likes = p[likeCount], reposts = p[retweetCount], views = p[viewCount], text = p[text], url = p[url]]),
Posts = Table.TransformColumnTypes(Table.FromRecords(Rows), {{"id", type text}})
in
Posts
Why not the From Web dialog? Microsoft's Web connector page lists the headers its Advanced option offers, and Authorization isn't one.
A December 2024 report on Microsoft Q&A says Excel dropped a typed Authorization header and got a 401. A blank query keeps the header in code.
Step 4: Load the posts as a table and refresh them
Select Home > Close & Load, and each post becomes a row. The query does three jobs:
Asksends one search.Record.AddFieldadds Weir's cursor from page two on.List.Generatestops on a null cursor or atMaxPages, as Weir's pagination docs advise.type textkeeps every digit of each id. The fields match our tweet JSON example.
createdAt stays as text in UTC, which still sorts by date.
Swap fromUsers for query = "pivot tables" to search a topic, and add onlyOriginal = true to drop replies.
Data > Refresh All runs it again. For a shared sheet that fills itself, our Google Sheets guide fits better.
How we tested a Power Query we couldn't run
We can't run Excel here, so on 22 October 2026 we tested it two ways.
Microsoft's open-source Power Query parser, version 4.0.0, parsed both queries cleanly. A broken control query failed.
Then we ran the same logic in Python against a local stub, fed with a real Weir search. That search for @msexcel returned three posts for 4 credits:
| id | createdAt (UTC) | likes | views |
|---|---|---|---|
| 2111508184418664915 | 2026-10-17 17:22 | 5 | 476 |
| 2111493445500215355 | 2026-10-17 16:24 | 10 | 1,764 |
| 2111444294548763047 | 2026-10-17 13:08 | 52 | 23,939 |
The first two were replies. The run showed:
- A normal walk took two calls: page two came back empty, with a null cursor.
- An endless cursor stopped at five calls, the
MaxPagescap. - Ids stored as numbers lost their last four digits.
What does it cost to refresh tweets in Excel?
Weir charges a credit per call and a credit per post. A full page of posts costs 21 credits.
Every refresh buys the posts again, and Excel can refresh on a timer under Connection Properties:
The free 5,000 credits cover a daily refresh.
Packs start at $5, and their credits never expire.
If the import doesn't work
- An error that mentions 401: the key is wrong or expired. Weir shows a key only once, so create a new one.
- An error that mentions 402: your credits ran out. Top up, or wait for next month's free credits.
- Ids end in zeros: a Changed Type step made
ida number. Delete that step.
When not to use Weir
- The posts are yours. Your archive and our viewer are free.
- You're on a Mac. Microsoft lists no Web source for Excel for Mac, so this query won't run there.
- A contract with X is required. Use the official X API, at $0.005 per post read.
- Price per post is all that matters. TwitterAPI.io lists $0.15 per 1,000 tweets, and it can post.
Your key sits inside the workbook, so give it only the read:x scope and an expiry, and revoke it if the file travels.
Weir reads public data only and isn't licensed by X, so access can change. This isn't legal advice.
FAQ
How do I export tweets to Excel for free?
For your own posts, request your X archive and save it as a CSV with our free viewer. For any public account, Weir's 5,000 free monthly credits cover about 238 full pages in Power Query. Failed calls cost nothing.
Why do tweet ids show as 2.11E+18 in Excel?
Excel keeps 15 significant digits, and X post ids have 19. Load the id column as Text in Power Query, or clear the 15-digit option under Automatic Data Conversion. A number already saved with zeros can't be restored.
Can I export someone else's tweets to Excel?
Yes, if the account is public. X's archive covers only your own account, so use an API, like the Power Query above. Protected accounts can't be exported, because only approved followers see their posts.
Sources
All checked on 22 October 2026:
- Microsoft Learn, Power Query Web, Text/CSV and editor pages: https://learn.microsoft.com/en-us/power-query/connectors/web/web, https://learn.microsoft.com/en-us/power-query/connectors/text-csv and https://learn.microsoft.com/en-us/power-query/power-query-ui
- Microsoft Learn, M function reference (Web.Contents, Json.Document, Json.FromValue, List.Generate, List.Combine, List.Transform, Record.AddField, Table.FromRecords, Table.TransformColumnTypes): https://learn.microsoft.com/en-us/powerquery-m/
- Microsoft Support, create a query and Power Query sources by Excel version: https://support.microsoft.com/en-us/office/create-load-or-edit-a-query-in-excel-power-query-ca69e0f0-3db1-4493-900c-6279bef08df4 and https://support.microsoft.com/office/power-query-data-sources-in-excel-versions-e9332067-8e49-46fc-97ff-f2e1bfa0cb16
- Microsoft Support, large numbers and automatic data conversions: https://support.microsoft.com/en-us/excel/keeping-leading-zeros-and-large-numbers and https://support.microsoft.com/en-us/excel/set-automatic-data-conversions
- Microsoft Support, refresh an external data connection: https://support.microsoft.com/en-us/office/refresh-an-external-data-connection-in-excel-1524175f-777a-48fc-8fc7-c8514b984440
- Microsoft Q&A, Authorization header report (19 December 2024): https://learn.microsoft.com/en-us/answers/questions/2133885/excel-get-data-from-web-loses-authorization-header
- Microsoft's open-source Power Query parser (npm package 4.0.0): https://github.com/microsoft/powerquery-parser
- X Help Center, download your X archive (Internet Archive copy of 15 October 2026): https://help.x.com/en/managing-your-account/how-to-download-your-x-archive
- X API pricing: https://docs.x.com/x-api/getting-started/pricing
- TwitterAPI.io: https://twitterapi.io/pricing and https://docs.twitterapi.io/api-reference/endpoint/create_tweet_v2
- Weir: https://docs.weirapp.io/reference/x/searchX, https://docs.weirapp.io/pagination and https://docs.weirapp.io/authentication
- Our search_x call for @msexcel through Weir (limit 3, 4 credits)