This is not necessary, but it is good practice to write code in a consistent and readable style. I removed the extra space after the - character in the setValues() method call.This is because the strict equality operator will only return true if the two values are equal in both type and value. I changed the if statement to use the strict equality operator (=) instead of the loose equality operator (=).I also made a few other minor changes to your code: SpreadsheetApp.getActiveSpreadsheet().getRange('Test2').setValue('-') If the value of cell "Test1" is "x", set the value of cell "Test2" to "-". The basic method for formatting a manuscript is to use 8.5 by 11-inch paper (A4 paper size), a simple serif font sized between 10-12 with 1-inch margins on all sides. Let andreCheck = SpreadsheetApp.getActiveSpreadsheet().getRange('Test1').getValue() Here is your code, modified to use the setValue() method: To fix this, you can use the setValue() method instead, which takes a single value as its argument. The error you're getting is because the setValues() method expects a two-dimensional array of values as its argument, but you're passing it a string. I have some experience with Google Apps Script and Javascript, so I'm happy to help. I'm sure this is due to my total lack of understanding of JS, but I'm trying to learn. SpreadsheetApp.getActiveSpreadsheet().getRange('Test2').setValues('-') In the Lydgate manuscript, large sheets were folded in half, and up to. Let AndreCheck = SpreadsheetApp.getActiveSpreadsheet().getRange('Test1').getValues() A gathering is a set of pages that are grouped together before being bound into a book. The fiber scientists and analysts at the Good Housekeeping Institute Textiles Lab have tested every type of bed sheet you can think of, from cotton. Enjoy free delivery on all orders over £60. When the weather is chillier, snuggle up with cosy jersey styles that feel soft against your skin. We have sizes from single to super-king, including deep options for thicker mattresses. The problem is, that I keep getting this error: The parameters (String) don't match the method signature for From simple white to bright pink and teal, our bed sheets come in a rainbow of colours to suit every room. When one contains an "x," the other must contain a "-", so my code checks to see if the cell contains an "x", and if it does, it should change the other cell to contain a "-". I have 2 cells containing data, either an "x" or a "-". I'm trying to do something fairly simple. Hi, I have quite a bit of experience automating spreadsheets in Excel and VBA, but I'm very new to Apps Script in Google Sheets, and I've never used Javascript before.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |