Google Sheets Script to Remove Empty Columns & Remove Empty Rows Automatically
У вашего броузера проблема в совместимости с HTML5
This is a tutorial on how to remove empty columns and rows across all tabs of a Google Sheet automatically with the click of a button. Here is a sample sheet. Go to the File - Make a Copy to edit the sheet: https://docs.google.com/spreadsheets/d/1Z-ehH-BAYQKOL9N-p6LgR3JEex0xpnTog73oeQbXUYE/edit?usp=sharing
To follow the full tutorial check out this blog post: http://www.ryanpraski.com/google-sheets-remove-empty-columns-rows-automatically/
1) File - Make a copy... of the sample sheet
2) Click the Remove Empty Rows button in Sheet1
3) Click Continue to allow the app to Authorize
4) Click Allow for the remove empty columns and rows to View and manage your spreadsheets
5) You'll see a yellow message on the top of the screen "Finished Script" when the Script has run and all the extra empty rows have been deleted from all the tabs in the sheet.
6) Click the Remove Empty Columns button in Sheet1.
7) You'll see the same yellow message on the top of the screen "Finished Script" when the Script has run and all the extra empty columns have been deleted from all the tabs in the sheet.
The 3 data sets I used in the 3 tabs of sheet are:
Sheet1: Google Analytics data
Sheet2: Alta, Utah annual snowfall data
Sheet3: Odell Beckham Jr. stats
To edit the script go to Tools - Script editor...
You edit the script and debug right in the Script editor. Click on the bug icon to step through your code for debugging and click on the play button to run your script.
The script in the sample sheet is linked to the two buttons. To assign a script to a button right click on the button then click the down arrow in the top right of the button. Click Asign script... then put the function you'd like to assign to run on the button click. In this case removeEmptyRows and removeEmptyColumns are the function names.
Google Sheets have a maximum of 2 million cells per sheet and empty cells count toward that total.
To see an example of how I used this script in combination with the Google Analytics Sheets Add-on to pull more than 10000 rows of unsampled Google Analytics data check out my post:
http://bit.ly/1UFjeGf
https://twitter.com/ryanpraski