PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, December 22, 2022

[FIXED] How to select and view only a specific cell?

 December 22, 2022     excel, syntax, xpath     No comments   

Issue

I want to extract from the next code, only the first value. Unfortunately, I was unable and I didn't found similar answer for my question. So, here is the example of script:

**$1.61**

With bold I mark the value which I am interested to be visible. Only this value in one cell. Unfortunately I didn't have need the rest of values from table.

Here I will add my function (function will be use ):

=importxml("https://www.coingecko.com/en/coins/polygon","//td/span")

Please let me know how how to select to view only 1st line/value.

Thanks to all for support.


Solution

This should select 1st //td/span

=importxml("https://www.coingecko.com/en/coins/polygon","(//td/span)[1]")

Reference

https://librarycarpentry.org/lc-webscraping/02-xpath/index.html



Answered By - Max Daroshchanka
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,259,997

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing