Home > front end >  Is it possible to import text from an online .txt file to Google sheets
Is it possible to import text from an online .txt file to Google sheets

Time:04-28

I am trying to import texts from ads.txt files from a certain websites to Gsheets. I try Importxml however it states that the important xml content can not be parsed.

example: I'm trying to import text from this file --> financhill.com/ads.txt

I'm using this code =IMPORTXML("https://financhill.com/ads.txt","/html/body/pre/text()")

the result is N/A important xml content can not be parsed.

CodePudding user response:

When I saw the data from the URL, it seems that the data is the CSV data. I think that this is the reason of your issue of the result is N/A important xml content can not be parsed.. In this case, how about using IMPORTDATA as follows?

=IMPORTDATA("https://financhill.com/ads.txt")

and

=IMPORTDATA("https://financhill.com/ads.txt",",")

enter image description here

Reference:

  • Related