عرض نطاق الخلية كعلامات البيانات
Contents
[
Hide
]
في Microsoft Excel 2013، يمكنك عرض نطاق الخلية لتسميات البيانات. يدعم Aspose.Cells هذه الميزة.
علامة اختيار لعرض نطاق الخلايا كتسميات بيانات
لعرض نطاق الخلايا كتسميات بيانات في Microsoft Excel:
- حدد تسميات بيانات السلسلة وانقر بزر الماوس الأيمن لفتح القائمة المنسدلة.
- حدد تنسيق تسميات البيانات. تعرض خيارات التسميات.
- حدد أو قم بمسح الخيار تحتوي التسمية على - قيمة من الخلايا.
الشفرة التالية تصل إلى بيانات تسميات سلسلة الرسم البياني وتحدد الخاصية DataLabels.ShowCellRange إلى true لتحديد الخيار التسمية تحتوي - القيمة من الخلايا.
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 the source Excel file | |
Workbook workbook = new Workbook(dataDir + "source.xlsx"); | |
// Access the first worksheet | |
Worksheet worksheet = workbook.Worksheets[0]; | |
// Access the chart inside the worksheet | |
Chart chart = worksheet.Charts[0]; | |
// Check the "Label Contains - Value From Cells" | |
DataLabels dataLabels = chart.NSeries[0].DataLabels; | |
dataLabels.ShowCellRange = true; | |
// Save the workbook | |
workbook.Save(dataDir + "output_out.xlsx"); |