Çalışma Sayfasında Değerler Yerine Formülleri Gösterme
Contents
[
Hide
]
t kullanarak Microsoft Excel’de hesaplanan değerler yerine formülleri göstermek mümkündür.Formülleri Göster seçeneğiformüllerkurdele. Formüller gösterildiğinde, Microsoft Excel formülleri çalışma sayfasında görüntüler. Aynı şeyi Aspose.Cells’i kullanarak da elde edebilirsiniz.
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ı
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |