We are experiencing severe performance issues when working with large sheets (about 1 Mio fields) and formulas.
using System;
using System.Collections.Generic;
using System.Text;
using Aspose.Cells;
using System.Drawing;
namespace AsposeTest {
class Program {
static void Main( string[] args ) {
Workbook workbook = new Workbook( FileFormatType.Xlsx );
Worksheet sheet = workbook.Worksheets[0];
for( int col=0; col < 1027; col++ )
sheet.Cells[0, col].Value = "3";
for( int row=1; row < 1000; row++ ) {
for( int col=0; col < 1027; col++ ) {
Cell cell = sheet.Cells[row, col];
string rowIndex = CellsHelper.RowIndexToName( row );
string formula =
"=-IF(BZ"+rowIndex+"=\"Yes\","+
"IF(AW"+rowIndex+"*{0}-CK"+rowIndex+">0,AW"+rowIndex+"*{0}-CK"+rowIndex+",0),"+
"IF(AY"+rowIndex+"*{0}-CK"+rowIndex+">0,AY"+rowIndex+"*{0}-CK"+rowIndex+",0)"+
")";
cell.Formula = formula;
}
}
workbook.Save( "test.xlsx", Aspose.Cells.SaveFormat.Xlsx );
}
}
}