تصدير التعليقات أثناء حفظ ملف Excel إلى HTML
سيناريوهات الاستخدام المحتملة
عند حفظ ملف Excel الخاص بك في HTML، لا يتم تصدير التعليقات. ومع ذلك، توفر Aspose.Cells هذه الميزة باستخدام الخاصية HtmlSaveOptions.IsExportComments. إذا قمت بتعيينها true، فسيعرض HTML أيضًا التعليقات الموجودة في ملف Excel الخاص بك.
تصدير التعليقات أثناء حفظ ملف Excel إلى Html
يشرح الكود العيني التالي استخدام الخاصية HtmlSaveOptions.IsExportComments. تُظهر اللقطة الشاشة تأثير الكود على HTML عند تعيين الخاصية إلى true. يُرجى تنزيل ملف Excel العيني وHTML الناتج للرجوع إليها.
الكود المثالي
// 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); |