示例#1
0
        public Form1()
        {
            InitializeComponent();
            mainSheet = new SpreadsheetEngine.Spreadsheet(50, 26);
            for (int i = 1; i <= 26; i++)
            {
                dataGridView1.Columns.Add(GetColFromIndex(i), GetColFromIndex(i));
            }
            for (int i = 1; i <= 50; i++)
            {
                dataGridView1.Rows.Add("");
                dataGridView1.Rows[i - 1].HeaderCell.Value = i.ToString();
            }
            mainSheet.CellChanged += OnCellChanged;

            /*mainSheet.CellGrid[0,0].CellText = "String";
             * mainSheet.CellGrid[0,1].CellText = "=A1";
             * mainSheet.CellGrid[0, 5].CellText = "=A1";*/
        }
示例#2
0
 /// <summary>
 /// Initialize any internal objects.
 /// </summary>
 private void ObjectInitialization()
 {
     _spreadsheet = new SpreadsheetEngine.Spreadsheet(Constants.numberOfRows, Constants.numberOfColumns);
 }