Genel API Aspose.Cells 8.7.2'deki değişiklikler

Eklenen API’ler

Varsayılan Hesaplama Motorunu Genişletti

Aspose.Cells API’leri, neredeyse tüm Microsoft Excel işlevlerini hesaplayabilen güçlü bir hesaplama motoruna sahiptir. Ayrıca, Aspose.Cells API’leri artık herhangi bir uygulamanın özel hesaplama gereksinimlerini karşılamak için varsayılan hesaplama motorunun genişletilmesine izin veriyor.

Aspose.Cells for Java 8.7.2 sürümüyle aşağıdaki API’ler eklenmiştir.

  1. SoyutHesaplamaMotor Sınıfı
  2. CalculationData Sınıfı
  3. CalculationOptions.CustomEngine Özellik

Basit kullanım senaryosu aşağıdadır.

Java

 public class CustomEngine extends AbstractCalculationEngine

{

	public void calculate(CalculationData data)

        {

		if(data.getFunctionName().toUpperCase().equals("SUM")==true)

                {

                    double val = (double)data.getCalculatedValue();

                    val = val + 30;

                    data.setCalculatedValue(val);

                }

        }

}

TextBoxCollection için Aşırı Yüklenmiş Dizin Oluşturucu eklendi

Aspose.Cells for Java 8.7.2, adını String olarak kullanarak TextBox örneğine erişmek için TextBoxCollection sınıfı için aşırı yüklenmiş dizin oluşturucuyu kullanıma sundu.

Basit kullanım senaryosu aşağıdaki gibidir.

Java

 //Create an instance of Workbook

Workbook workbook = new Workbook();

//Access the first Worksheet from the collection

Worksheet sheet = workbook.getWorksheets().get(0);

//Add a TextBox to the collection

int idx = sheet.getTextBoxes().add(10, 10, 10, 10);

//Access the TextBox using its index

TextBox box = sheet.getTextBoxes().get(idx);

//Set the name for the TextBox

box.setName("MyTextBox");

//Access the same TextBox via its name

box = sheet.getTextBoxes().get("MyTextBox");