حساب صيغة صفيف لجداول البيانات
Contents
[
Hide
]
يمكنك إنشاء جدول بيانات في Microsoft Excel باستخدام Data> What-If Analysis> Data Table …. يتيح لك Aspose.Cells الآن حساب صيغة الصفيف لجدول البيانات. الرجاء استخدامالمصنف .CalculateFormula () كالمعتاد لحساب أي نوع من الصيغ.
في نموذج التعليمات البرمجية التالي ، استخدمنا الامتدادملف اكسل المصدر . إذا قمت بتغيير قيمة الخلية B1 إلى 100 ، فإن قيم جدول البيانات المملوءة باللون الأصفر ستصبح 120 كما هو موضح في الصور التالية. يقوم نموذج التعليمات البرمجية بإنشاء ملفالإخراج PDF.
فيما يلي نموذج التعليمات البرمجية المستخدمة لإنشاء ملفالإخراج PDF منملف اكسل المصدر. يرجى قراءة التعليقات لمزيد من المعلومات.
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-.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"); |