Çalışma Kitabı Formüllerini Hesaplama
Contents
[
Hide
]
Çalışma Kitabı Formüllerini Hesaplama
Lütfen, çalışma kitabınızdaki formülleri hesaplamak için Workbook.CalculateFormula() metodunu kullanın. Bu metodun kullanımıyla ilgili örnek kod aşağıda açıklanmıştır.
Örnek Kod
This file contains hidden or 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
workbook, _ := NewWorkbook() | |
worksheets, _ := workbook.GetWorksheets() | |
worksheet, _ := worksheets.Get_Int(0) | |
cells, _ := worksheet.GetCells() | |
cell, _ := cells.Get_String("A1") | |
cell.PutValue_Int(5) | |
cell, _ = cells.Get_String("A2") | |
cell.PutValue_Int(15) | |
cell, _ = cells.Get_String("A3") | |
cell.PutValue_Int(25) | |
cell, _ = cells.Get_String("A4") | |
cell.SetFormula_String("=SUM(A1:A3)") | |
workbook.CalculateFormula() | |
value, _ := cell.Get_IntValue() | |
println(value) |
Konsol Çıktısı
Yukarıdaki örnek kodun konsol çıktısı budur.
Calculated Value of Cell A4: 45