HTML ile Node.js kullanarak C++

Excel Çalışma Kitabını HTML’ye Dönüştürme

Aspose.Cells API, elektronik tabloyu HTML formatına aktarmayı destekler. Bu amaçla, Aspose.Cells HtmlSaveOptions sınıfını kullanarak çıktı HTML’sinin çeşitli yönlerini kontrol etme esnekliği sağlar.

Aşağıdaki kod örneği, Node.js kullanarak bir çalışma kitabını HTML dosyası olarak kaydetmeyi göstermektedir:

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");
// Load your source workbook
const workbook = new AsposeCells.Workbook(filePath);

// Save file to HTML format
workbook.save("out.html");

Excel Çalışma Kitabını MHTML Dosyalarına Dönüştürme

MHTML, normal HTML’yi dış kaynaklar (örneğin, içerik bağlanan resimler, animasyonlar, sesler vb.) ile birleştirir ve tek bir dosyada tutar. .mht dosya uzantısına sahip e-postalar için kullanılır. Aspose.Cells, MHTML dosyalarını okuma ve yazmayı destekler.

Aşağıdaki kod örneği, Node.js kullanarak bir çalışma kitabını MHTML dosyası olarak kaydetmeyi göstermektedir.

const AsposeCells = require("aspose.cells.node");
const path = require("path");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Book1.xlsx");

// Load your source workbook
const workbook = new AsposeCells.Workbook(filePath);

// Save file to mhtml format
workbook.save("out.mht");

Gelişmiş Konular