How to do page wise subtotal in google spread sheet - google-apps-script

I am in need of creating pagewise subtotal (page wise running total) in a google spread sheet. This mean in each page (Letter-size) I need to sum a field and display. I see that spread sheet puts header & page numbers in each page. Is there a way that I can have this value too. After looking at the documentations and search I found the Spread Sheet doesn't have page break. Also tried to calculate the row heights and break the page by adding my sum and page numbers. That is not always reliable and messy.

As you noticed, Google Spreadsheets don't know anything about pages... Pages are created at export / printing time which is 'too late' for what you need to do.
The closest solution I can imagine would be to export a number of rows + the subtotal as a table into a Google document, the latter having page numbers, footers and headers to customize their layout in a proper way.
You will loose the spreadsheet features on your way but I don't know if that would be an issue for you.
You'll also loose part of the formatting (if you added some in the SS) but that should be more or less re-doable from within the text document.

Related

Is there any way to make it so that a cell can only be changed once in Google Sheets?

I have a Sheet which I would like to use as a simultaneous sign up for many people for timeslots for an event. We have noticed that what can happen is users erasing each other's entries in the sheet. Ideally we would like to make it so once someones name is entered for a timeslot it cannot be removed by other users.
I've tried to use data validation to reject certain criteria, but I've only managed to get it to reject a cell changing from blank to a non-blank value. Which I achieved with the following:enter image description here. But I'd like the opposite behaviour, with some additional functionality
Changing the formula to NOT(ISBLANK(B2)) doesn't seem to put any restriction on the cell at all as hitting backspace or delete on cell seems to clear the contents without ever considering that an input to check. Changing the value never causes the cell to go blank so it doesn't seem to affect changing either. I'm really at a loss as to how to do this and any help is appreciated. I'm open to solutions which use VBA or other programming languages to get the desired result as well.

Pasting data in multiple text boxes

So I have a zero-reporting data entry task which I do monthly. For a couple of cells, I have to enter zero manually (as shown in the image), which is very much frustrating.
Is there any web add-on I could use to paste zero in multiple cells at once?
Browsers only select text.
No way to select input-boxes (at least not yet).
I know what you are thinking.. Excel! Or Spreadsheets.
So.. unless the web-application you use, is rewritten to "mimic" spreadsheets (just like Google Sheets runs within the browser 100%)..
.. can't give you any hope.

Chart text responses in a google spreadsheet

I have a google form that has the following multiple choice question:
How would you rate your general well-being today?
-Very well
-Slightly less than par
-Poor
-Very poor
-Terrible
The form then saves to a google sheet. A column of this data might look like this:
How would you rate your general well-being today?
Slightly less than par
Very well
Very well
Very well
Very well
Slightly less than par
Very well
Where the question is in the top row...and each subsequent row is the a day of the week (and how the person was feeling that day).
I am wanting to view this data in a chart (pie or bar); but am not sure how to handle it since its text and not numbers. One way I was considering is the add some sort of function to the cell that would convert the response to an integer so it could be charted. So in the case of this question the scale would be 1-5; 1 being Very Well and 5 being Terrible. Feels kind of janky, but wanted to check and see if there is an easier way. The once I had a text respesnetation of the responses I could easilty put a chart on them.
Here is what I ended up doing.
In a separate column I have the following function:
=SWITCH(K2,"Very well",0,"Slightly less than par",1,"Poor",2,"Very poor",3,"Terrible",4)
Where column K2 contains the users response. I copied this function to all rows in this column, so now I have numbers 1-5 to represent the users response. Now just highlight the column and add the date on the X-axis and it gives me a nice chart like this:
Might be nice to have the labels rather than numbers on the left side if anyone has suggestions on that.

Google scripts unhideRows not working

I have a script for Google Sheets I am working on. I realize there are better ways to do what I am attempting (cough html/database cough), but I am required to make this spreadsheet work.
In short, I am trying to hide and unhide rows dynamically. There does not appear to be a way to get filters to update without redoing them, so I am attempting to use hideRows to hide them and unhideRows to reveal them as needed.
The hideRows command works below. The unhideRows command does not. At this time, they are literally this close together in the code. Originally, I was hiding on one sheet and unhiding on another, but set up like this to troubleshoot. There is no filtering on this sheet (because it didn't work, I turned it off). I tried setting the value in unhideRows directly to the value tested instead of a variable.
The row in question hides, but does not unhide.
I tried unhiding a different row just in case google was fumbling with hide this, unhide it back to back. I am not getting unhide to work.
{ //thisRow = the row number of a range, in this case 2 if output to screen
pImages.hideRows(thisRow);
pImages.unhideRows(thisRow);
}
Apparently, the answer is not to unhideRows() which is the one the documents alluded to, but showRows () which does make more sense in everyday language. Thanks again to Mr.Houdini on the Google forums.

Mimicking Spreadsheet Style in a MS-Access Report

I've been tasked with creating a report in MS-Access that looks exactly like a spreadsheet that a vendor supplies to us for my company to fill in.
The number of records per page is about 40 and there are usually 3-6 pages that need to be prepared. Each month there is a new report sent out and I just got finished writing it all in manually while looking at a report I generated. The purpose of this is to avoid manually transcribing the data.
They are adamant about using their format and will not accept a different report, so I'm trying to be sneaky about it.
Problems
I can duplicate the header of the spreadsheet and the rows just fine, I've just run into a few snags.
Blank rows need to be displayed on the last page of the report instead of nothing being printed (whitespace) and then the page footer.
Whitespace that exists between the Details and the Page Footer is present. The page footer should instead appear to be another row of cells, except that it has the text Page Total and the page total on that row.
The second item happens because the Page Footer always appears at the bottom of the page in a set location as opposed to where the records ended (even if they took up the entire page).
Ideas
If there is someway I could create a
group based on page, then I could
stick that right after the details
section so that it would line up
nicely as opposed to the page total
and still be able to display the page
total.
Inserting blank rows into the rows to
match the number of records, is this
possible? I could calculate how many
extra rows I would need to complete
the page, but how would I insert
those rows into the data source?
Creating a new excel spreadsheet from a template and just writing to there the rows.
I'm using MS-Access 2007 here with a MS-Access 2003 MDB.
Any help is greatly appreciated.
If you need gridlines to print at the end of an Access report, one option is to create a background bitmap that you insert into the report's picture property.
This would be rather fussy, as you could use it only if your headers and footers are identical on all pages, and you'd have to be sure that controls entirely cover the whole detail area so that the background graphic will not show through except on pages where there is blank space. Also, if you altered the width of your detail fields, you'd need to edit the graphic to harmonize with those changes.
Let me just say that I consider the insistance on replicating the look of the spreadsheet to be incredibly boneheaded stupid. What purpose is served by these gridlines except to replicate the visual appearance of a spreadsheet? Are they going to use the grid to write things in? If not, then it's just a really idiotic requirement.
Start by turning a copy of their Excel report into a template file. Remove the data, but keep headers, formating, and formulas as needed (Some data manipulation will be easier in Access.).
This way you can enter and store data in Access. Instead of having users fill-in the spreadsheet in Excel with VBA based on the template file.
You'll run into different issues of how to place the results of a query to a worksheet and filling in formulas in specific fields, etc., but those can be later questions to post.