تصدير التعليقات أثناء حفظ ملف Excel في HTML
Contents
[
Hide
]
سيناريوهات الاستخدام الممكنة
عند حفظ ملف Excel في HTML ، لا يتم تصدير التعليقات. ومع ذلك ، يوفر Aspose.Cells هذه الميزة باستخدام امتدادHtmlSaveOptions.SExportCommentsخاصية. إذا قمت بتعيينهحقيقي، ثم سيعرض HTML أيضًا التعليقات الموجودة في ملف Excel الخاص بك.
تصدير التعليقات أثناء حفظ ملف Excel إلى Html
يشرح نموذج التعليمات البرمجية التالي استخدامHtmlSaveOptions.SExportComments خاصية. تُظهر لقطة الشاشة تأثير الكود على HTML عند تعيين الخاصية علىحقيقي. يرجى تنزيل ملفنموذج لملف Excelو الولدت HTMLكمرجع.
عينة من الرموز
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-Java | |
// Load sample Excel file | |
Workbook wb = new Workbook(srcDir + "sampleExportCommentsHTML.xlsx"); | |
// Export comments - set IsExportComments property to true | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.setExportComments(true); | |
// Save the Excel file to HTML | |
wb.save(outDir + "outputExportCommentsHTML.html", opts); |