Çalışma Sayfasında Değerler Yerine Formülleri Gösterme

Contents
[ ]

Aspose.Cells bir sağlarWorksheet.setShowFormulas() Emlak. Bunu şuna ayarla:doğruMicrosoft Excel’i formülleri gösterecek şekilde ayarlamak için.

Aşağıdaki resimde, A3 hücresinde bir formül bulunan çalışma sayfası gösterilmektedir: =Toplam(A1:A2).

A3 hücresinde formül bulunan çalışma sayfası

yapılacaklar:resim_alternatif_metin

Aşağıdaki resimde, hesaplanan değer yerine ayarlanarak etkinleştirilen formül gösterilmektedir.Worksheet.setShowFormulas() mülkiyetdoğru Aspose.Cells ile.

Çalışma sayfası artık hesaplanan değer yerine formülü gösteriyor

yapılacaklar:resim_alternatif_metin

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(ShowFormulas.class);
// Load the source workbook
Workbook workbook = new Workbook(dataDir + "source.xlsx");
// Access the first worksheet
Worksheet worksheet = workbook.getWorksheets().get(0);
// Show formulas of the worksheet
worksheet.setShowFormulas(true);
// Save the workbook
workbook.save(dataDir + "out.xlsx");