Convert XML exported from WordPress onto Google Sheets.
A Spreadsheet-bound apps script solution to convert XML exported from the native WordPress tool into your Google Sheets file.
This is a solution with a very limited target: if you want to export the contents of your WordPress-powered website into your spreadsheet, using existing WordPress plugins should be your first choice. Crawl the web for keywords like
csv. Or if you are using WordPress versions 4.7 or later, you should be able to take advantage of the WordPress REST API, which, as part of the WordPress core features, would provide you with a more integrated experience.
This particular solution can be useful for those who do not/cannot install new plugins for some reason, and/or those who are using old versions of WordPress that are too old for newer features.
You can either
- Copy this sample spreadsheet or
- Copy & paste the file contents inside the
srcdirectory of the GitHub repository using Google Sheets’ script editor.
In the latter case,
- Name the HTML file together with its directory
dialog.htmlshould be save as
src/dialog.htmlon the script editor. You wouldn’t need to change the default file name
code.gs; just copy the contents of
- Copy the contents of worksheets
Template - Channeland
Template - Itemsto your spreadsheet.
Be sure to reload the spreadsheet after saving the script.
How to Use
- From the menu, select
WordPress XML to Sheets>
- You will be prompted to upload the XML file that you exported from your WordPress website. Select your file and
- After about a minute of waiting, you will see a couple of worksheets created on your spreadsheet. One to give you a summary of the website and the other for the whole list of contents that you exported.
Terms and Conditions
You must agree to the Terms and Conditions to use this solution.
Source code is available on GitHub. Please make requests for enhancements or reports of bugs via the GitHub issue. License regarding the use of the code is available on the GitHub repository.