Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
357 views
in Technique[技术] by (71.8m points)

google sheets - How do you reference a cell in quotations using the IMPORTXML formula?

I am wanting to reference a cell for the URL section as well as the xpath_query section of the IMPORTXML formula.

Because the XPath formula requires the inputs to be in quotations the cell references no longer work.

What would you suggest for the following formula? =IMPORTXML(C2,B7)

C2 = https://www.example.com B7 = //nav[@aria-label='test']

question from:https://stackoverflow.com/questions/65892951/how-do-you-reference-a-cell-in-quotations-using-the-importxml-formula

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

try:

=IMPORTXML(C2&B7; "//*")

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...