?
Solved

Add a save button to Google sheets

Posted on 2015-02-05
11
Medium Priority
?
169 Views
Last Modified: 2015-02-17
I don't know if I want a Save button, I don't know what my alternatives are, it's the first time using Google sheets.  I have a Master sheet set up for people to use, but I don't want them to have a chance to change the master and I don't trust them to create a copy before using the sheet.

I want them to start out opening the master but have the name changed after they open it and before they have the chance to make any changes.  The name of the new sheet should be the name used in the Master but add to it the current date. The new sheet can be added to the current workbook

Please include examples of code or pointers to samples that all ready work

Thanks for the help, remember its the first time using sheets
0
Comment
Question by:c7c4c7
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 5

Expert Comment

by:Christopher Barnes
ID: 40594863
If your using Google Apps for Business it is possible to do most of what you are asking by using Templates. Templates can be created and saved for your own business (domain) access. When an actor selects the desired Template Sheet, a copy is made automatically and placed in their personal Google Drive. The copy of the Template Sheet is called "Copy of the original template name".

So the above basically this satisfies your request " I want them to start out opening the master but have the name changed after they open it and before they have the chance to make any changes." The name will be the same as the Template/Master with the pre-fix COPY. The date will be today's creation date.

--

Submitting a template to your domain template gallery
0
 

Author Comment

by:c7c4c7
ID: 40594881
We are not using Google Apps for Business
0
 
LVL 5

Expert Comment

by:Christopher Barnes
ID: 40594972
You can also submit Templates to the Public Gallery if not using Google Apps. Of course the Template is available for the world to see, may or may not be an issue!

https://support.google.com/drive/answer/148817?hl=en
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:c7c4c7
ID: 40595032
I would prefer to keep it private, is it not possible to accomplish what I want with some code
0
 
LVL 5

Expert Comment

by:Christopher Barnes
ID: 40595058
I'm not a programmer but it looks like you may be able to do. Every Google Sheet can include Google Scripts (code.gs). You may be able to create a Google Script that creates a new file based on the master. You would set the master as read-only.

Google Script References for Drive https://developers.google.com/apps-script/reference/drive/

Google Script References for Sheets https://developers.google.com/apps-script/reference/spreadsheet/
0
 

Author Comment

by:c7c4c7
ID: 40596094
I've come up with some code that almost works for what I need, my problem is that I am getting a misleading error, in the script, that I do not know how to fix.  Can someone help

I get the following error "Missing ; before statement"
The error is pointing to this line -  DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
 I've looked at a lot of other code that people have posted for the same problem but do not see why I am getting the error, I'm sure it is something obvious

Thanks for the help
duplicateTemplateSheet.txt
0
 

Accepted Solution

by:
c7c4c7 earned 0 total points
ID: 40598608
Thanks for all of the help, see the attached file for how I solved the problem
duplicateTemplateSheet.txt
0
 

Author Comment

by:c7c4c7
ID: 40599127
I've requested that this question be closed as follows:

Accepted answer: 0 points for c7c4c7's comment #a40598608

for the following reason:

Just what I wanted
0
 
LVL 5

Expert Comment

by:Christopher Barnes
ID: 40599128
I believe I assisted the author and should receive some points.
0
 

Author Comment

by:c7c4c7
ID: 40610070
As I understood it the moderator was going to make the decision.  I expect the moderator to do that
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Challenge I was developing a new website for a client the other week in WordPress and they asked me if it was possible to track the clicks of the sponsor images they include on their home page. My first port of call was to use the Yoast Google …
The choice of selecting a perfect productive suite for one’s organization is a critical decision that an IT Manager or a CIO has to make. And when it comes to choosing a cloud-based productivity suite, the choice gets all the more difficult. This is…
This Micro Tutorial will demonstrate importing calendar invites from events such as webinars into your Google Calendar.
This Micro Tutorial demonstrates in Google Analytics how to create a custom report that shows you traffic over time using the month of year dimensions. There are also instructions on how to fix Google's odd month of year formatting, which Microsoft …
Suggested Courses
Course of the Month9 days, 14 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question