تحويل Excel إلى HTML بالعناوين
Contents
[
Hide
]
تحويل Excel إلى HTML بالعناوين
يوفر Aspose.Cells خيار تصدير عناوين الصفوف والأعمدة أثناء تحويل Excel إلى HTML. ويمكن تحقيق ذلك باستخدامHtmlSaveOptions.ExportHeadingsتم توفير الخاصية بواسطة API. القيمة المفترضة لـHtmlSaveOptions.ExportHeadings يكونخطأ شنيع . يمرحقيقي كمعامل لتقديم العناوين في ملف الإخراج HTML. توضح الصورة التالية ملف الإخراج الذي تم إنشاؤه بواسطة الكود التالي.
يوضح نموذج التعليمات البرمجية التالي استخدامHtmlSaveOptions.ExportHeadingsخاصية تقديم العناوين في ملف الإخراج HTML.
عينة من الرموز
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
# Load the Sample Workbook | |
workbook = Workbook() | |
# Access first worksheet | |
worksheet = workbook.getWorksheets().get(0) | |
# Access cell A1 and put some text inside it. | |
cell = worksheet.getCells().get("A1") | |
cell.putValue("This is some text.") | |
# Get the Normal and Html5 strings. | |
strNormal = cell.getHtmlString(False) | |
strHtml5 = cell.getHtmlString(True) | |
# Print the Normal and Html5 strings | |
print("Normal:\r\n" + strNormal) | |
print("Html5:\r\n" + strHtml5) |