What have you tried so far? Without posting your code, it's not possible to provide an exact answer. As for myself, I've never tried it, but it does look possible. Although it appears that it's not as straightforward a process as one would think. According to the online docs it looks like you will need to read in all of the sheets of the file, and then use the update and write options, and then rewrite the entire file.
It looks like some experimentation might be in order on your part. I'd first start by trying with reading and re-writing the entire spreadsheet with no modifications first, and then proceed from there. See what you are able to accomplish in small steps, and then build on it.
- To update an existing file, read all sheets in the file, modify one or more sheets, and use the contents, and use the write action and Update actions (for multiple sheet files) to rewrite the entire file.