Output
Product 1
Sales: 16269
Profit Margin: 20.00%
Unit Price: $33
Using the plugin is easy and very straight forward. You need first to identify your need and the plug in will have you sorted. The plugin will rely on Google API service to get the data directly from your Google Sheets document. You will need to do the following:
The plugin uses shortcode functionality built on WordPress to retrieve all data from Google Sheets.
All shortcodes utilizes the following parameters:
Let us say that you have a landing page and you want to map live data from Google sheets and update them automatically without editing the page manually on wordpress.
The short code in this example will be like this:
[ sheetrieve id=”Your Document ID” sheet=”Sheet Name” limit=”How many rows you want returned”][/sheetrieve]
Than you use the column heading whenever your need. If you have a heading called ID then you use {{ID}} in your page to get that data.
Lets say that I have the following data in my google sheets that I want to show in my page natively. We will use the above shortcode to show a single product on a single page.
we will use the following shortcode to get the required data.
[ sheetrieve id=”Document ID” sheet=”Products” limit=”1″ search=”ID=1″][/sheetrieve]
Output
Sales: 16269
Profit Margin: 20.00%
Unit Price: $33
Lets imagine you want to output the table as it is in your website. You can do that! the table will have the following features:
In addition to the basic parameters you can use the following:
Using the previous data we can show the table as follows:
[ sheetrieve-table id=”Document ID” sheet=”Products” columns=”ID,Product,Volume,Sales” legend=”ID,Product Name,Sales Volume, Total Sales” limit=100 class=”table” searchable=1″][/sheetrieve-table]
Now things gets interesting. The plugin uses Chartjs powerful library as a basis for all your charting needs. The full library is available, you can use Line, Bar, Radar and Scatter charts types.
In addition to the basic parameters you can use the following:
Using the previous data we can show the table as follows:
[ sheetrieve-chart id=”Document ID” sheet=”Products” datasets=”% of Sales” label=”Product” style=”pie”][/sheetrieve-chart]
Input your search keywords and press Enter.