تصدير DataBar و ColorScale و IconSet التنسيق الشرطي أثناء تحويل Excel إلى HTML باستخدام Node.js عبر C++
تصدير DataBar، ColorScale و IconSet لتنسيق الشروط أثناء تحويل Excel إلى HTML
توضح اللقطة الشاشية التالية ملف Excel عينة مع تنسيق البيانات الشريطية ومقياس الألوان وتنسيق الرموز. يمكنك تنزيل ملف Excel العينة من الرابط المعطى.
توضح اللقطة الشاشية التالية ملف HTML الناتج من Aspose.Cells الذي يظهر تنسيق البيانات الشريطية ومقياس الألوان وتنسيق الرموز. كما يمكنك رؤية أنه يبدو تمامًا مثل ملف Excel العينة.
الكود المثالي
يوضح رمز المثال التالي تحويل ملف Excel النموذجي إلى HTML وهو مجرد تحويل [Excel إلى HTML] عادي (/cells/ar/nodejs-cpp/convert-workbook-to-different-formats/#convertworkbooktodifferentformats-convertingexcelworkbooktohtml).
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Specify the file path
const filePath = path.join(dataDir, "sample.xlsx");
// Load your sample excel file in a workbook object
const wb = new AsposeCells.Workbook(filePath);
// Save it in HTML format
wb.save(path.join(dataDir, "ConvertingToHTMLFiles_out.html"), AsposeCells.SaveFormat.Html);