简体   繁体   中英

Google Script Editor - Import multiple Csv files as multiple spreadsheets

I have 90 csv files in my Google Drive Id like to import into 90 distinct Google spreadsheets.

I used this tutorial to import 1 csv to 1 spreadsheet, but would it be possible to script import for my 90 files ?

For this you can loop the same code for all files.

  1. You have to make changes in this following line:

    function convertRangeToCsvFile_(csvFileName) { // Get the selected range in the spreadsheet var ws = SpreadsheetApp.getActiveSpreadsheet().getActiveSelection();

to get the range of each sheet by name.

  1. Also save the filenames for the csv files and loop through them.

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM