有条件地删除InporthTML数据输出中的行

发布于 2025-02-06 14:59:32 字数 370 浏览 3 评论 0原文

=ARRAYFORMULA(IFERROR(
substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*","")*1,
substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*","")))

其中d2 = maruti和b2 = 30jun2022假设...

现在我想删除所有列值为零的行。

=ARRAYFORMULA(IFERROR(
substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*","")*1,
substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*","")))

where D2 = MARUTI and B2 = 30Jun2022 let's say...

Now I want to remove the row in which all columns value is zero.

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

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

发布评论

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

评论(2

以为你会在 2025-02-13 14:59:32

尝试

    =query(ARRAYFORMULA(IFERROR(substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*",""), substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"",""))),
"where "&ARRAYFORMULA(TEXTJOIN(" and ",, "Col"&SEQUENCE(11,1,1,1)&" is not null")),1)

Try

    =query(ARRAYFORMULA(IFERROR(substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"*",""), substitute(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"Table",1),"",""))),
"where "&ARRAYFORMULA(TEXTJOIN(" and ",, "Col"&SEQUENCE(11,1,1,1)&" is not null")),1)
月棠 2025-02-13 14:59:32

使用:

=QUERY(ARRAYFORMULA(IFERROR(
 SUBSTITUTE(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"table",1),"*",)*1,
 SUBSTITUTE(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"table",1),"*",))),
 "where "&TEXTJOIN(" and ", 1, "Col"&SEQUENCE(11)&" <>0"))

use:

=QUERY(ARRAYFORMULA(IFERROR(
 SUBSTITUTE(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"table",1),"*",)*1,
 SUBSTITUTE(IMPORTHTML("https://niftyinvest.com/option-chain/"&D2&"?expiry="&$B$2,"table",1),"*",))),
 "where "&TEXTJOIN(" and ", 1, "Col"&SEQUENCE(11)&" <>0"))

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文