Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Year | Month
- 2012 | 12
- 2013 | 01
- 2013 | 02
- 2013 | 03
- Year | Month
- 2012 | 12
- 2013 | 01
- 2013 | 02
- 2013 | 03
- 2012 | 12
- 2013 | 01
- 2013 | 02
- 2013 | 03
- 2012 | 12
- 2013 | 01
- 2013 | 02
- 2013 | 03
- function output(range,amount,header) {
- var output = [];
- // check if range is cell
- if(typeof range == 'string') {
- for(var i=0; i<amount; i++) {
- output.push([range]);
- }
- return output;
- } else {
- // check if header is wanted
- var value;
- if(header == 1) {
- output.push(range[0]);
- value=header;
- } else if(header == "") {
- value=0;
- } else {
- value=0;
- }
- for(var i=0; i<amount; i++) {
- for(var j=value, jLen=range.length; j<jLen; j++) {
- output.push(range[j]);
- }
- }
- return output;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement