Farklı Sayfalar için Başlık ve Yiyecekleri Ayarlama (Header ve Footer) Node.js ve C++ kullanımı

MS Excel’de Farklı Üstbilgi ve Altbilgiler Ayarlama

Farklı Üstbilgi ve Altbilgiler Ayarlama

  1. Sayfa Düzeni > Başlık ve Alt Bilgi > Üstbilgi/Altbilgi‘ye tıklayın.
  2. Farklı Tek ve Çift Sayfalar veya Farklı ilk sayfa seçeneklerini kontrol edin.
  3. Farklı başlık ve altbilgileri girin.

Aspose.Cells for Node.js via C++ ile farklı başlık ve altbilgi ayarlama

Aspose.Cells, Excel ile aynı davranışı sergiler.

  1. PageSetup.isHFDiffOddEven() ve PageSetup.isHFDiffFirst() bayraklarını ayarlar
  2. Farklı başlık ve altbilgileri girin.
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, "sample.xlsx");
// Loads the workbook which contains hidden external links
const wb = new AsposeCells.Workbook(filePath);

// Gets the setting of page setup.
const pageSetup = wb.getWorksheets().get(0).getPageSetup();
// Sets different odd and even pages
pageSetup.setIsHFDiffOddEven(true);
pageSetup.setHeader(1, "I am the header of the Odd page.");
pageSetup.setEvenHeader(1, "I am the header of the Even page.");
// Sets different first page
pageSetup.setIsHFDiffFirst(true);
pageSetup.setFirstPageHeader(1, "I am the header of the First page.");