Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30193

Re: Automatically Expand the Number of Columns Encompassed in a JavaScript Function

From Scott Sauyet <scott@sauyet.com>
Newsgroups comp.lang.javascript
Subject Re: Automatically Expand the Number of Columns Encompassed in a JavaScript Function
Date 2016-04-02 20:02 +0000
Organization A noiseless patient Spider
Message-ID <ndp8hh$g3u$1@dont-email.me> (permalink)
References <e6835ec2-1087-4c90-997b-7138b6642d91@googlegroups.com>

Show all headers | View raw


ottopageken wrote:

> I have a function similar to the following:
> function Tabulate() {
>   var spreadsheetAll = SpreadsheetApp.getActiveSpreadsheet();
>   var currentSheet = ss.getSheetByName("XYZ");
>   var $CountofColumnsinSheet= 27 
>   var $combinedAll=   currentSheet.getRange
>     (27,2,currentSheet.getLastRow(),1).getValues();
> [ ... ]
> I plan on adding more columsn so that var $CountofColumnsinSheet will
> grow to 28 or 29 or 30. I don't want to have to go into my Script Editor
> to constantly change the var $CountofColumnsinSheet to some
> incrementally larger number and then make appropriate changes in var
> $Combined where I would need to change the initial 27 to 28 or 29. Is
> there a function in JavaScript that automatically expands to fill in any
> additional columns to the right that are created?

You have not given enough context here.  What environment is this in 
which you're editing spreadsheets?  What do you mean by "automatically 
expands to fill in any additional columns"?  Are you expecting something
to add data to a spreadsheet to accomplish this?

Please start over and start from the beginning.  What are you trying to 
do, and where are you attempting it?

  -- Scott

Back to comp.lang.javascript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Automatically Expand the Number of Columns Encompassed in a JavaScript Function ottopageken@gmail.com - 2016-04-01 17:40 -0700
  Re: Automatically Expand the Number of Columns Encompassed in a JavaScript Function Scott Sauyet <scott@sauyet.com> - 2016-04-02 20:02 +0000

csiph-web