GithubHelp home page GithubHelp logo

remcoe33 / apps-script-driveimage2sheets Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 6 KB

Get images from a drive file and insert to google sheets with the =IMAGE() formula.

License: MIT License

JavaScript 100.00%

apps-script-driveimage2sheets's Introduction

apps-script-driveImage2sheets

Get images from a drive file and insert to google sheets with the =IMAGE() formula.

Be aware:

This script will set the image 'access to everyone with link' as viewer. This may not work on Workspace users. Depends on the admin settings. You have a script runtime limitation, so maybe you need to batch process.

Installation:

  • Tools -> Script editor.
  • Clear the little code you see and past the code from below.
  • Optional: change the , to ; on codeline 58 / 60 if you have sheets formula's with ;.
  • Execute once, give permission and ignore the error.
  • Close the script editor.
  • Refresh your spreadsheet browser tab.

Use:

Now you see a new menu: "Drive images" in there there are 4 options:

Setup:

  • Enter google drive folder id where the images are stored (if you need to batch proces, delete the images that are done and add new ones)
  • Choose image filetype: png / jpeg / gif / svg
  • Choose image mode: 1 / 2 / 3 (4 is not supported in this script) 1 = resizes the image to fit inside the cell, maintaining aspect ratio. 2 = stretches or compresses the image to fit inside the cell, ignoring aspect ratio. 3 = leaves the image at original size, which may cause cropping.
  • On / off switch. If you leave blank then nothing, if you want a on off switch then enter the cell A1Notation like: A1. This wrap the =IMAGE inside a IF statement. This will make a checkbox in that cell. If it is checked the =IMAGE formula will be used, if it is unchecked then blank.

Run preconfigured

  • Run the script with the settings above.

Run manually

  • Run the script manually. So you will get the same questions as Setup 1-4.

Download url's

  • Creates a list with filenames and drive download url's.

apps-script-driveimage2sheets's People

Contributors

remcoe33 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jorgeeduardoj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.