[WordPress] 外掛分享: SheetMirror for Google Sheets

首頁外掛目錄 › SheetMirror for Google Sheets
WordPress 外掛 SheetMirror for Google Sheets 的封面圖片
全新外掛
安裝啟用
尚無評分
5 天前
最後更新
問題解決
WordPress 6.3+ PHP 7.4+ v1.0.0 上架:2026-04-06

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SheetMirror for Google Sheets」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

SheetMirror embeds a live Google Sheets spreadsheet into any WordPress post or page using a simple shortcode. Unlike basic CSV importers, SheetMirror can connect to the Google Sheets API v4 to retrieve not just your data, but the full visual formatting of every cell – giving your readers a table that looks exactly like the one you designed in Google Sheets.
Why SheetMirror ?
Spreadsheet data on the web is often reduced to a bland, unstyled grid. The formatting you spent time on – the bold headers, the colour-coded rows, the carefully aligned columns – disappears entirely. SheetMirror solves this by faithfully translating your Google Sheets formatting into standard HTML and inline CSS, so the table your readers see on your site is a true reflection of the original.
Two Fetch Modes
API Mode (recommended)
Uses the Google Sheets API v4 to retrieve both cell values and full formatting metadata. A Google Cloud API key is required. This is the mode that enables all the rich formatting features described below.
CSV Mode (no API key needed)
Fetches data via Google’s public CSV export URL. No API key or account is required – just share your sheet as “Anyone with the link can view.” Cell values are displayed in a clean, readable table, without formatting. Ideal for simple data tables where styling is not a priority.
Formatting Reproduced via the API
When API Mode is enabled, SheetMirror retrieves and applies the following formatting properties from your spreadsheet:

Horizontal alignment – Left, Centre, Right, and Justify, applied per cell.
Vertical alignment – Top, Middle, and Bottom.
Text decoration – Bold (), italic (), underline (), and strikethrough () are each rendered using the appropriate semantic HTML element.
Font family – The typeface specified in the spreadsheet is passed through as a CSS font-family value.
Font size – Rendered as pt values, matching the size as set in Google Sheets.
Font colour – Foreground text colour is reproduced as a CSS color value.
Cell background colour – Background fill colours are rendered as CSS background-color values. White and black (the default colours) are suppressed to avoid overriding your theme’s own styling.
Merged cells – Merge regions are faithfully reproduced using HTML rowspan and colspan attributes.
Cell borders – Per-cell border styles (solid, dashed, dotted, double) and weights (1 px, 2 px, 3 px) are applied as individual CSS border-{side} declarations.
Text wrap strategy – Wrap and Clip modes are translated to the appropriate CSS white-space and overflow rules. The Overflow mode (content spilling into adjacent cells) is a layout behaviour specific to Google Sheets and cannot be reproduced in an HTML table.
Text direction – Right-to-left text is reproduced with CSS direction: rtl.
Hyperlinks – Both cell-level hyperlinks and links set via the Google Sheets link format are rendered as tags with target="_blank" rel="noopener noreferrer".
Column widths – Each column’s pixel width is retrieved from the spreadsheet and applied via

elements, reproducing the exact column proportions of the original. Active when the “Auto column width” option is off (the default).
Row heights – Each row’s pixel height is retrieved and applied as an inline height style on the

element, preserving the vertical spacing of the original spreadsheet. Active when the “Auto column width” option is off (the default).

Table Display Options
Each registered table can be configured independently with the following options:

Use Google Sheets API – Toggle between API Mode (full formatting) and CSV Mode (values only).
Treat first row as header – Renders the first row inside a

element using

cells with scope="col", improving accessibility and allowing header-specific styling.
Auto column width – When off (default), column widths are taken directly from the spreadsheet’s pixel dimensions via the API, reproducing the layout as designed in Google Sheets. When on, each column shrinks to fit its content (table-layout: auto). The “Auto” badge is shown in the table list only when this option is enabled.
Borderless – Hides all cell borders for a cleaner, minimal presentation. When off, a standard 1 px grid is shown as a fallback, with per-cell API borders taking priority where available.

Caching
All API and CSV responses are cached using WordPress transients for 5 minutes, keeping your page loads fast and your API quota usage low. A “Clear Cache” button is available for every registered table so you can force a refresh immediately after updating your spreadsheet.
Shortcode Usage
After registering a table in Settings → SheetMirror, embed it anywhere using its tag name as a shortcode:
[your_tag_name]

For example, if you registered a table with the tag sales_2026, place [sales_2026] in any post, page, or widget area.
Scaling the table
An optional scale attribute lets you render the table at a percentage of its original size. Accepted values are integers between 10 and 200.
[sales_2026 scale="50"]

Requirements

A Google Sheets spreadsheet shared as “Anyone with the link can view.”
For API Mode: a Google Cloud API key with the Google Sheets API enabled.

External Services
This plugin connects to external services operated by Google. Depending on the fetch mode you choose, one or both of the following connections will be made.
Google Sheets API v4 (API Mode)
When API Mode is enabled, this plugin sends requests to the Google Sheets API v4 to retrieve cell values and formatting metadata from your spreadsheet.

Service: Google Sheets API v4, provided by Google LLC.
Data sent: The Spreadsheet ID and cell range you registered, together with your Google Cloud API key. No personal data of your site’s visitors is transmitted.
When: Every time a page containing the shortcode is loaded and no valid cached response exists (cache duration: 5 minutes). A request is also made when you use the connection-test button in the settings page.
Terms of Service: https://developers.google.com/terms
Privacy Policy: https://policies.google.com/privacy

Google Sheets CSV Export (CSV Mode)
When CSV Mode is enabled, this plugin fetches data from Google’s public CSV export URL for your spreadsheet.

Service: Google Sheets public CSV export (/export?format=csv), provided by Google LLC.
Data sent: The Spreadsheet ID and numeric sheet identifier (gid). No API key or visitor data is transmitted.
When: Every time a page containing the shortcode is loaded and no valid cached response exists (cache duration: 5 minutes).
Terms of Service: https://policies.google.com/terms
Privacy Policy: https://policies.google.com/privacy

Google Sheets Sheet List (CSV Mode – sheet name resolution)
When CSV Mode is enabled and a sheet name is specified in the cell range, this plugin fetches the spreadsheet’s HTML view page in order to resolve the sheet name to its numeric identifier (gid). This request is made once per spreadsheet and the result is cached together with the table data.

Service: Google Sheets HTML view page (/htmlview), provided by Google LLC.
Data sent: The Spreadsheet ID only. No API key or visitor data is transmitted.
When: On the first load of a page containing a CSV Mode shortcode that specifies a sheet name, when no valid cached response exists. Not used when a gid is available directly from the registered URL, or when API Mode is enabled.
Terms of Service: https://policies.google.com/terms
Privacy Policy: https://policies.google.com/privacy

Donate
If you find this plugin useful and would like to support its development,
you can make a voluntary donation via PayPal.
Your support helps keep this plugin maintained and improved.
Thank you!
PayPal: https://www.paypal.me/Kasuga16

延伸相關外掛

文章
Filter
Apply Filters
Mastodon