Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
#include <iostream>
#include <memory>
#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\\");
// Output directory path
U16String outDir(u"..\\Data\\02_OutputDirectory\\");
// Path of input excel file
U16String designerFile = srcDir + u"SampleInput.xls";
// Path of output pdf file
U16String pdfFile = outDir + u"Output.out.pdf";
try
{
// Open the template excel file
std::unique_ptr<Workbook> wb = std::make_unique<Workbook>(designerFile);
// Save the pdf file
wb->Save(pdfFile, SaveFormat::Pdf);
}
catch (const std::exception& e)
{
std::cerr << e.what() << std::endl;
}
Aspose::Cells::Cleanup();
return 0;
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.