Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Please see the following sample code that converts an Excel file with multiple worksheets to PDF.
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-C
// Source directory path
U16String srcDir(u"..\\Data\\01_SourceDirectory\\");
// Initialize a new Workbook and open an Excel file
U16String inputFilePath = srcDir + u"input.xlsx";
Workbook workbook(inputFilePath);
// Implement one page per worksheet option
PdfSaveOptions pdfSaveOptions;
pdfSaveOptions.SetOnePagePerSheet(true);
// Save the PDF file
U16String outputFile = srcDir + u"OutputFile.out.pdf";
workbook.Save(outputFile, pdfSaveOptions);
std::cout << "PDF file saved successfully!" << std::endl;
Aspose::Cells::Cleanup();
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.