DNS in Google Sheets also available in Excel?

Hi, at this link https://developers.cloudflare.com/1.1.1.1/fun-stuff/dns-in-google-sheets/ it gives a nice script to use in Google Sheets. Is there a script I can use in Excel as well?

Best regards, Robin

Check it out

1 Like

Thank you for the link. I’m afraid it will not be possible to read CAA records with this script :frowning:

Fixed it with a Power Query in Excel (so no VBA needed):
let
domain=Excel.CurrentWorkbook(){[Name=“domain”]}[Content]{0}[domainname],
dns=Excel.CurrentWorkbook(){[Name=“type”]}[Content]{0}[typename],
Bron = Json.Document(Web.Contents(“https://cloudflare-dns.com/dns-query?name=” & domain & “&type=” & dns & “”,
[Headers=[accept=“application/dns-json”]])),
Answer = Bron[Answer],
#“Converted to Table” = Table.FromList(Answer, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#“Expanded Column1” = Table.ExpandRecordColumn(#“Converted to Table”, “Column1”, {“data”}, {“result”}),
ErrorHandling = try #“Expanded Column1” otherwise “no record found”
in
ErrorHandling