How To Convert Google Sheets Spreadsheets to XML

XML is the Extensible Markup Language file format, which is widely compatible with many software packages. There are now a variety of applications that have default file formats based on the XML syntax, which include the MS Office and LibreOffice suites. XML is essentially a text-based file format that you can edit with text editors, and it has a few advantages compared with other formats. For example, it’s a much more compact format than other alternatives.

However, the Google Sheets cloud software doesn’t include any built-in option with which you can export spreadsheets to the XML format. If you click File > Download as in Google Sheets, you can download and save the spreadsheets with the formats shown in the snapshot directly below. They include ODS, PDF, HTML and CSV but not XML. The closest thing to XML there is Excel XLSX, which is Microsoft Office’s open XML format for spreadsheets.

google sheets
One thing you can do is download the spreadsheet in one of those formats and then convert it to XML. There are a few software packages and web tools that enable you to convert PDFs to the XML format. PDF to XML OCR Converter, NitroPDF and PDF2XML are a few of the software packages you can convert PDFs to XML with. Click here to open the pdfx v1.9 web tool that converts PDFs to XML and HTML.

google sheets2

You can convert spreadsheet PDFs to XML with that tool by pressing the Choose file button. Then select the PDF spreadsheet you saved from Google Sheets. Press the Submit button to convert the PDF to XML. Then you can select to open the spreadsheet in XML or HTML formats. Click xml to open the file in XML format as shown in the snapshot below.

google sheets3
Now you can save the spreadsheet by right-clicking its XML page and selecting Save as. A window opens from which you can select XML Document on its Save as type drop-down menu. So select that format, enter a file title and press the Save button.

Then you can open the XML from the folder you saved it to with suitable text editor software. You can open XMLs with text editors such as Notepad++, which is one of the best third-party Notepad alternatives covered in this Tech Junkie post. Alternatively, check out this page and press the Browse button there to open it with XML Viewer, which includes a tree view to display XML input as shown in the snapshot below.

google sheets4
Converting Spreadsheets to XML with the Export Sheet Data Add-on

However, Google Sheets also has a variety of add-ons that add new options and tools to it. Export Sheet Data is an add-on that enables users to export single sheets or entire spreadsheets to either XML or JSON formats. So you can export Google spreadsheets to XML with that add-on instead of downloading and converting them to the format.

First, open this page and press the Add button there to install the Export Sheet Data extension. Then open a spreadsheet in Google Sheets, and click Add-ons to open a menu that will include Export Sheet Data. Select Export Sheet Data > Open Sidebar to open the sidebar shown in the snapshot directly below.

google sheets5
Now you can click the Select Format menu to select to convert the spreadsheet to either XML or JSON formats. Click Select Sheet(s) to select to convert all sheets in the spreadsheet or just the current sheet. Or you can select Custom to choose more specific sheets to convert. If you scroll down the sidebar, you can select further XML options to adjust the formatting. Press the Visualize button at the bottom of the sidebar to open a preview of the XML file before exporting it.

Press the Export button to compile the spreadsheet to the XML format. Then an Export Complete window opens with a link to the spreadsheet XML. Click the link to open the spreadsheet XML in the browser as shown in the snapshot below. You can press the Download button there to save the spreadsheet XML to a hard drive folder.

google sheets6

Click the More actions button for further options. Then you can select to share the XML by clicking Share. Or select Add star so that you can access the spreadsheet XML more quickly in Google Drive.

So Export Sheet Data is the XML export tool that Google Sheets otherwise lacks. With that add-on, you can quickly export your Google spreadsheets to XML without saving and compiling them to XML.

Posted by Matthew on April 21, 2017

One thought on “How To Convert Google Sheets Spreadsheets to XML”

Jodie Baldwin says:
Very nice description Matthew! With addons or these third party extensions one can simplify almost everything on Google drive and sheets and they are so many in numbers that you can’t imagine one like this could exist. Thanks for sharing.
Reply

Leave a Reply

Your email address will not be published. Required fields are marked *