无法使用 Vlookup 获取链接在 G Sheet 单元格中显示图像(返回空白或错误​​)

发布于 2025-01-09 14:33:57 字数 733 浏览 1 评论 0原文

我有一个包含表单答案的 Google 工作表,并且我在 Google 工作表中创建了一个模板,以使用 vlookup(葡萄牙语中的 PROCV)转换报告中答案表中的每一行。电子表格中的最后一列是图像的链接,由回答表单的人上传。

除图像外,vlookup 工作正常。它不显示单元格中的图像。

我尝试过:

=image(PROCV(H7;'Respostas ao formulário 1'!1:630;21))

它返回一个空白单元格。

以及

=IMAGE("https://drive.google.com/uc?export=download&id="&INDEX(SPLIT(PROCV(H7;'Respostas ao formulário 1'!1:630;21),"="),1,2))

我在 stackoverflow 中找到的

=IMAGE("https://drive.google.com/uc?export=download&id="&REGEXEXTRACT(PROCV(H7;'Respostas ao formulário 1'!1:630;21),"id\=(.+)"))

关于此问题的另一个问题,并返回“错误”。

同样重要的是,我已经更改了图像中的权限(知道链接的任何人都可以访问)。

请问有什么见解吗? 预先感谢您的时间和关注。

I have a Google sheet with answers to a form, and I created a template in Google Sheets to transform each row in the answers sheet in a report, using vlookup (=PROCV in portuguese). The last column in the spreadsheet is a link for an image, uploaded by who answered the form.

The vlookup is working fine, except for the image. It's not displaying the image in the cell.

I have tried:

=image(PROCV(H7;'Respostas ao formulário 1'!1:630;21))

It returns a blank cell.

and also

=IMAGE("https://drive.google.com/uc?export=download&id="&INDEX(SPLIT(PROCV(H7;'Respostas ao formulário 1'!1:630;21),"="),1,2))

and

=IMAGE("https://drive.google.com/uc?export=download&id="®EXEXTRACT(PROCV(H7;'Respostas ao formulário 1'!1:630;21),"id\=(.+)"))

which I found here in stackoverflow, in another question about this issue, and return an "ERROR".

Also important, I've already changed permissions in the image (anyone with the link can access).

Any insights, please?
Thank you in advance for your time and attention.

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

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

发布评论

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

评论(2

污味仙女 2025-01-16 14:33:57

如果 http://drive.google.com/uc?export=download&id={file_id} 不起作用,请尝试以下格式:

链接格式:

http://drive.google.com/uc?export=view&id={file_id}

尝试使用此公开图像:
http://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

原始链接图像公式;

=image("https://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv")

使用 regexextract 获取文件 ID 的公式:

=Image("http://drive.google.com/uc?export=view&id="®EXEXTRACT(VLOOKUP(H7,'Respostas ao formulário 1'!1:630,21),"id\=(.+)"))

输出:

  • Vlookup 输出:
    http://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

  • Regexextract 输出:
    1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

  • 原始链接图像输出:
    output2

  • 图像正则表达式提取输出:
    输出

注意:

  • 如果图像仍未显示,则您的链接存在问题,其他人可能无法使用该链接。要确认此问题,请在隐身模式下打开链接。如果显示,则它是公开的。如果不是,则不是,并且图像将不会使用 IMAGE 公式显示。
  • 确保附加到链接格式的只是 ID,没有其他内容。
  • 请参阅示例表

编辑:

  • 这似乎是您的查找ID包含#,使用以下公式在其前面添加反斜杠

=Image("http://drive.google.com/uc?export=view&id="®EXEXTRACT(VLOOKUP(regexreplace(H7; "#"; "\#");'Respostas ao formulário 1'!1:630;21);"id\=(.+)"))

If http://drive.google.com/uc?export=download&id={file_id} does not work, try this format:

Link Format:

http://drive.google.com/uc?export=view&id={file_id}

Try this publicly available image:
http://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

Raw link image formula;

=image("https://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv")

Formula using regexextract to get file ID:

=Image("http://drive.google.com/uc?export=view&id="®EXEXTRACT(VLOOKUP(H7,'Respostas ao formulário 1'!1:630,21),"id\=(.+)"))

Outputs:

  • Vlookup output:
    http://drive.google.com/uc?export=view&id=1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

  • Regexextract output:
    1YEpZitKgY6YT0TMDvOX4uqoxD5_aTuEv

  • Raw link image output:
    output2

  • Image regexextract output:
    output

Note:

  • If the image is still not showing, there is an issue with your link and it may not be available to anyone else. To confirm this issue, open the link in incognito mode. If it shows, it is publicly available. If not, then it isn't and the image will not show using IMAGE formula.
  • Make sure the one you append to the link format is only the ID and nothing else.
  • See sample sheet

EDIT:

  • It seems your lookup ID contains #, add a backslash before it by using the below formula

Formula:

=Image("http://drive.google.com/uc?export=view&id="®EXEXTRACT(VLOOKUP(regexreplace(H7; "#"; "\#");'Respostas ao formulário 1'!1:630;21);"id\=(.+)"))
命硬 2025-01-16 14:33:57

尝试将“is_sorted”参数设置为 false。从您的第一个公式中,我了解到您正在根据“Respostas ao Formula 1”工作表的第 1 行至 630 行查找 H7 中的值,并且您需要第 23 列 (W)。一些可能会给您带来问题的区域是将排序设置为 false,因此它必须完全匹配,查找值是否位于资源表的第一列中?

本质上,使用与此匹配的格式,您不应该有任何问题:

名为“Respostas ao formulário 1”的工作表。请注意,我隐藏了 B:V 列来合并图像并仅显示重要信息。

输入图片这里的描述

最后是公式表:

我们正在针对第二个表查找单元格 F1“Value1”中的值,并从链接返回图像。

输入图片此处描述

Try setting the "is_sorted" parameter to false. From your first formula I gather you are looking up the value in H7 against the sheet 'Respostas ao formulário 1' rows 1 through 630 and you want the 23 column (W). Some areas that can give you problems is setting the sort to false, so it has to be an exact match, is the lookup value in the first column of the resource sheet?

Essentially with a format matching this you shouldn't have any issues:

Sheet named 'Respostas ao formulário 1'. Notice I have hidden columns B:V to consolidate the image and only show important information.

enter image description here

Finally the formula sheet:

We are looking up the value in cell F1 "Value1" against the second sheet and returning the image from the link.

enter image description here

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