将范围转换为图像 [英] Convert range to image

查看:60
本文介绍了将范围转换为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找将GAS范围另存为图片(jpg)的方法.类似于Excel VBA

I'm looking the way to save GAS range as a picture (jpg). Something similar to Excel VBA

Range("MainMatrixName").CopyPicture Appearance:=xlScreen, Format:=xlPicture ' copy Excel selection

推荐答案

在应用程序脚本中没有这样的东西. 您可以尝试对以下代码进行编码,但是它将另存为pdf而不是jpg:

no such thing in apps script. you could try coding the following but it will save as pdf not jpg:

  1. 有一个空白电子表格或创建一个电子表格
  2. 将所需范围复制到A1中的电子表格中.删除不需要的行和列,刷新.
  3. 将电子表格获取为pdf.

所有步骤都可以在应用脚本中执行.

all steps are doable in apps script.

这篇关于将范围转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆