تنفيذ النطاقات غير المتتالية
Contents
[
Hide
]
عادةً ما تكون المجموعات المسماة مستطيلة مع الخلايا متقاربة ومتصلة ببعضها البعض. ولكن في بعض الأحيان، قد تحتاج إلى استخدام نطاق خانة غير متتالي حيث لا تكون الخلايا متصلة. تدعم Aspose.Cells إنشاء نطاق مسمى بخلايا غير متصلة.
الرمز المثالي أدناه يوضح كيفية إنشاء نطاق مسمى غير متتابع بـAspose.Cells for .NET.
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); | |
// Instantiating a Workbook object | |
Workbook workbook = new Workbook(); | |
// Adding a Name for non sequenced range | |
int index = workbook.Worksheets.Names.Add("NonSequencedRange"); | |
Name name = workbook.Worksheets.Names[index]; | |
// Creating a non sequence range of cells | |
name.RefersTo = "=Sheet1!$A$1:$B$3,Sheet1!$D$5:$E$6"; | |
// Save the workbook | |
workbook.Save(dataDir+ "Output.out.xlsx"); |