简体   繁体   English

我想从一个 Google 表格单元格中拆分多个 URL,然后将它们作为图像添加到 Google Doc 中

[英]I would like to split multiple URLs from a single Google Sheets cell and then add them as images into a Google Doc

I have a Google Sheet doc that has column called Imgs which contains a cell with multiple URLs that links to multiple images:我有一个 Google Sheet 文档,其中包含一个名为 Imgs 的列,其中包含一个具有多个 URL 的单元格,这些 URL 链接到多个图像:

在此处输入图像描述

So, I would like to do the following with an Apps Script:因此,我想使用 Apps 脚本执行以下操作:

  1. Split the URLs by eliminating the comma delimitator通过消除逗号分隔符来拆分 URL

  2. Find a way to create an array with each URL想办法用每个 URL 创建一个数组

  3. Pick URL by URL from the array and then attach each one to the Google Doc as images, leaving something like this从数组中选择 URL by URL,然后将每个图像作为图像附加到 Google Doc,留下类似这样的内容

Here's the link to the Google Sheet as an example: link以下是指向 Google 表格的链接作为示例: link

Any help would be appreciated!任何帮助,将不胜感激!

Without your specific sheet I made a similar one没有你的具体表我做了一个类似的

在此处输入图像描述

E9 has a long string of URLs E9 有一长串网址

'https://www.agustafamily.net/Hayden.png,https://www.agustafamily.net/wedding.jpg 'https://www.agustafamily.net/Hayden.png,https://www.agustafamily.net/wedding.jpg

Using the SPLIT function returns individual URLS使用 SPLIT function 返回单个 URL

=SPLIT(E9,",")

The using the IMAGE() function to get the images使用 IMAGE() function 获取图像

=image(E10)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 用于对多个 Google 表格中的单个单元格求和的 JS 公式故障排除 - Troubleshooting JS formula for summing a single cell across multiple Google Sheets 从特定的 Google Sheet 单元格导出 Google Doc URL 并转换为 PDF - Export Google Doc URLs from a specific Google Sheet cell and convert to PDF Google Sheets API:从公共工作表中读取单个单元格值 - Google Sheets API: Read single cell value from public sheet 如何使用谷歌脚本从谷歌表中提取特定列到谷歌文档? - How do I extract specific columns from google sheets to google doc using Google Script? 从各种 Google 表格单元格中提取不同的链接,使用 Google Apps 脚本将它们作为活动 URL/超链接粘贴到 Google 文档模板中 - Extract different links from various Google Sheet cells, paste them in a Google Doc Template as Active URLs /Hyperlinked using Google Apps Script 如何将其他谷歌表格中的值添加在一起并将它们显示在一张表格上? - How do i add values from other google sheets together and display them on one sheet? 如何将多个图表从谷歌表格添加到 1 张谷歌幻灯片中 - How to add multiple charts into 1 google slides from google sheets Google Sheets Apps 脚本——来自多行单元格的 select 值 - Google Sheets Apps Script -- select value from cell with multiple lines 如何使用 Google Sheets 中的数据将数组插入到 Google Doc 中? - How do I insert an array into a Google Doc using data from Google Sheets? 如何从 Google 表格运行 Google Doc ID 循环 - How to run a loop of Google Doc IDs from Google Sheets
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM