Shopify publishes a text file containing their Product Taxonomy online at the following URL:
https://help.shopify.com/txt/product_taxonomy/en.txt
I've pasted the file contents into Google Sheets as a single column multiple times lately and would like to see if I can automate it.
Sample File Contents
Row # | Content |
---|---|
1 | # Shopify Product Taxonomy: 2022-02-23 |
2 | 1 - Animals & Pet Supplies |
3 | 2 - Animals & Pet Supplies > Live Animals |
4 | 3 - Animals & Pet Supplies > Pet Supplies |
5 | 4 - Animals & Pet Supplies > Pet Supplies > Bird Supplies |
... | ... |
5595 | 5594 - Apparel & Accessories > Clothing Accessories > Traditional Clothing Accessories > Kimono Underclothes |
5596 | 5595 - Apparel & Accessories > Clothing Accessories > Traditional Clothing Accessories > Obi Accessories |
I tried the following formula:
=IMPORTDATA("https://help.shopify.com/txt/product_taxonomy/en.txt")
It brought in the file contents but assumed that the file was delimited with commas which caused 100s of rows to be split into multiple columns.
For example, about 550 rows contain at least one comma, and more than 50 of those have multiple commas.
Row # | Example Content containing Comma(s) |
---|---|
70 | 69 - Animals & Pet Supplies > Pet Supplies > Pet Bowls , Feeders & Waterers |
1364 | 1363 - Electronics > Circuit Boards & Components > Printed Circuit Boards > Printer , Copier , & Fax Machine Circuit Boards |
I then tried specifying >
as delimiter but ended up with too many columns for my next steps.
=IMPORTDATA("https://help.shopify.com/txt/product_taxonomy/en.txt",">")
How can I use IMPORTDATA and get the file contents as a single column?
>
use a character that you are 100% it's not included in the file.