Google表中的数据

发布于 2025-02-01 18:30:44 字数 849 浏览 2 评论 0 原文

我尝试了以下公式获取PCR数据...

=importxml("https://niftyinvest.com/put-call-ratio/MARUTI?expiry=30JUN2022","//span[@class='white-text red darken-1']"

对于不同的股票,该值以3种不同颜色为红色/蓝色/绿色的值,具体取决于其预定义的值。 如何获得通用公式,以便它可以以任何颜色plz检索数据????

其他数据链接...

1- https://niftyinvest.com/put-vest.com/put-com/put-com/put-com/put-com/ptip-com- call-ratio/indigo?expiry = 30jun2022

2-

3- https://niftyinvest.com/put-call-ratio/maruti?expiry=30Jun2022

I tried following formula for getting pcr data...

=importxml("https://niftyinvest.com/put-call-ratio/MARUTI?expiry=30JUN2022","//span[@class='white-text red darken-1']"

For different stocks the values are in 3 different colours red/blue/green depending on their values predefined.
How to get the common formula so that it can retrieve data in whatever colour plz ????

Other Data Links...

1- https://niftyinvest.com/put-call-ratio/indigo?expiry=30jun2022

2- https://niftyinvest.com/put-call-ratio/britannia?expiry=30jun2022

3- https://niftyinvest.com/put-call-ratio/MARUTI?expiry=30JUN2022

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

囍笑 2025-02-08 18:30:44

对于 pcr

=INDEX(IMPORTXML(A2, 
 "//span[@class='white-text red darken-1'] | 
  //span[@class='white-text light-blue lighten-1'] |
  //span[@class='white-text green darken-1']"), 1)

”在此处输入图像说明“


Intraday pcr

=INDEX(IMPORTXML(A2, 
 "//span[@class='white-text red darken-1'] | 
  //span[@class='white-text light-blue lighten-1'] |
  //span[@class='white-text green darken-1']"), 2)

“在此处输入图像说明”

for Pcr:

=INDEX(IMPORTXML(A2, 
 "//span[@class='white-text red darken-1'] | 
  //span[@class='white-text light-blue lighten-1'] |
  //span[@class='white-text green darken-1']"), 1)

enter image description here


for Intraday Pcr:

=INDEX(IMPORTXML(A2, 
 "//span[@class='white-text red darken-1'] | 
  //span[@class='white-text light-blue lighten-1'] |
  //span[@class='white-text green darken-1']"), 2)

enter image description here

风为裳 2025-02-08 18:30:44

尝试使用此通用XPath // H5 // SPAN [@CLASS [contains(。,'White-Text')]]]

=transpose(importxml(A2,"//h5//span[@class[contains(.,'white-text ')]]"))

编辑:您可以使用查询:重新排序列,并按照特定标准进行选择。

=QUERY(IMPORTHTML("https://niftyinvest.com/put-call-ratio/indigo?expiry=30jun2022","table",1),"select Col1,Col2,Col3,Col4,Col5,Col6,Col7 where Col4>0.6 and Col7>0.7 and Col1 <> 'IOC' and Col1 <> 'POWERGRID ' ")

Try to use this generic xpath //h5//span[@class[contains(.,'white-text ')]]

=transpose(importxml(A2,"//h5//span[@class[contains(.,'white-text ')]]"))

enter image description here

edit: you can use queries to reorder columns and select by specific criteria.

=QUERY(IMPORTHTML("https://niftyinvest.com/put-call-ratio/indigo?expiry=30jun2022","table",1),"select Col1,Col2,Col3,Col4,Col5,Col6,Col7 where Col4>0.6 and Col7>0.7 and Col1 <> 'IOC' and Col1 <> 'POWERGRID ' ")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文