Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.

Aspose.Cells behaves the same as Excel.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Create a new workbook
Workbook wb;
// Get the first worksheet's page setup
PageSetup pageSetup = wb.GetWorksheets().Get(0).GetPageSetup();
// Set different headers for odd and even pages
pageSetup.SetIsHFDiffOddEven(true);
pageSetup.SetHeader(1, u"I am the header of the Odd page.");
pageSetup.SetEvenHeader(1, u"I am the header of the Even page.");
// Set a different header for the first page
pageSetup.SetIsHFDiffFirst(true);
pageSetup.SetFirstPageHeader(1, u"I am the header of the First page.");
Aspose::Cells::Cleanup();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.