Size of sheet and rows

After having made a migration of my installation I managed to make a bit of a mess of one or two things. As I was sorting it out I wondered if either of the following 2 things can be done.

  1. I know you can effectively hard code the column names rather than A,B etc. Is it possible to do the same with the row names rather than numbers?

  2. When setting up a new sheet is there any way (using the code) to make the sheet bigger? At the moment I’m using the settings button but it would be easier to have it do it when I cut and paste the code.

Still loving this project - I should look at more of it than just the spreadsheet. Many thanks in advance.

Hi,
thanks for your feedback.

  1. You should modify function fillEmpty in file dhtmlxspreadsheet.js like here:
fillEmpty: function() {
		var data = { rows: [] };
		for (var i = 0; i < this.settings.rows; i++) {
			var row = [this.getColName(i + 1)];
			for (var j = 1; j <= this.settings.cols; j++)
				row[j] = "";
			data.rows.push({ id: i + 1, data: row });
		}
		this.grid.parse(data, "json");
	},
  1. You may open file dhtmlxspreadsheet.js and find the follow code:
    cols: 26,
    rows: 50,

It’s a default spreadsheet sizes, you may change them here.

Great - thanks for sorting that out :slight_smile: