Veri Tablolarının Dizilerini Hesaplama
Aşağıdaki örnek kodda, kaynak excel dosyası‘ı kullandık. Eğer B1 hücresinin değerini 100 olarak değiştirirseniz, Sarı renkle doldurulan Veri Tablosu değerleri 120 olarak değişir ve çıktı PDF’sini oluşturur. Daha fazla bilgi için yorumları okuyunuz.
çıktı PDF’sini oluşturmak için kaynak excel dosyası‘ı kullanılan örnek kod aşağıdaki gibidir. Daha fazla bilgi için yorumları okuyunuz.
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Create workbook from source excel file | |
Workbook workbook = new Workbook(dataDir + "DataTable.xlsx"); | |
// Access first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// When you will put 100 in B1, then all Data Table values formatted as Yellow will become 120 | |
worksheet.Cells["B1"].PutValue(100); | |
// Calculate formula, now it also calculates Data Table array formula | |
workbook.CalculateFormula(); | |
// Save the workbook in pdf format | |
workbook.Save(dataDir + "output_out.pdf"); |