إظهار الفاصلة العليا في الخلايا
Contents
[
Hide
]
في Microsoft Excel ، يتم إخفاء الفاصلة العليا في قيمة الخلية. يوفر Aspose.Cells خاصية لعرض الفاصلة العليا بشكل افتراضي. لهذا ، يوفر APIالمصنف.الإعدادات خاصية. تشير هذه الخاصية إلى ما إذا كان سيتم تعيين ملفاقتباسالخاصية عند إدخال قيمة سلسلة تبدأ بعلامة اقتباس واحدة للخلية. وضعالمصنف.الإعدادات ملكية لخاطئةسيعرض الفاصلة العليا في ملف Excel الناتج.
تُظهر لقطة الشاشة التالية ملف Excel الناتج مع الفاصلة العليا المرئية.
يوضح مقتطف الكود التالي هذا عن طريق إضافة البيانات باستخدام Smart Markers في ملف Excel المصدر. يتم إرفاق ملفات إكسل المصدر والمخرجات كمرجع.
عينة من الرموز
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
//Source directory | |
string sourceDir = RunExamples.Get_SourceDirectory(); | |
string outputDir = RunExamples.Get_OutputDirectory(); | |
// Instantiating a WorkbookDesigner object | |
WorkbookDesigner designer = new WorkbookDesigner(); | |
Workbook workbook = new Workbook(sourceDir + "AllowLeadingApostropheSample.xlsx"); | |
workbook.Settings.QuotePrefixToStyle = false; | |
// Open a designer spreadsheet containing smart markers | |
designer.Workbook = workbook; | |
List<DataObject> list = new List<DataObject> | |
{ | |
new DataObject | |
{ | |
Id =1, | |
Name = "demo" | |
}, | |
new DataObject | |
{ | |
Id=2, | |
Name = "'demo" | |
} | |
}; | |
// Set the data source for the designer spreadsheet | |
designer.SetDataSource("sampleData", list); | |
// Process the smart markers | |
designer.Process(); | |
designer.Workbook.Save(outputDir + "AllowLeadingApostropheSample_out.xlsx"); |
تنفيذDataObjectيتم إعطاء فئة أدناه
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
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
internal class DataObject | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
} |