Rita tidslinje medan Excel konverteras till PDF med C++
Contents
[
Hide
]
Rita tidslinje vid rendering av Excel till PDF
Om du har en Excel-fil med tillämpad tidslinje och vill exportera den till PDF med tidslinjeinställningar, stöder Aspose.Cells detta nu som standard. Exportera helt enkelt Excel-filen med tidslinje till PDF, och den genererade PDF-filen visar tillämpad tidslinje.
Följande exempelkod laddar in den exempel-Excel-filen som innehåller en befintlig tidslinje. Sedan sparar den arbetsboken som utmatnings-PDF-filen. Följande skärmbild jämför käll-Excel-filen och den genererade PDF-filen.

Exempelkod
#include <iostream>
#include "Aspose.Cells.h"
using namespace Aspose::Cells;
int main()
{
Aspose::Cells::Startup();
// Load sample Excel file
U16String inputFilePath(u"input.xlsx");
std::unique_ptr<Workbook> wb = std::make_unique<Workbook>(inputFilePath);
// Save file to pdf
U16String outputFilePath(u"out.pdf");
wb->Save(outputFilePath, SaveFormat::Pdf);
std::cout << "Workbook saved successfully as PDF!" << std::endl;
Aspose::Cells::Cleanup();
return 0;
}
#include <aspose.cells.h>
using namespace Aspose::Cells;
int main() {
Aspose::Cells::Startup();
// Load the sample Excel file
Workbook workbook(u"input.xlsx");
// Save the workbook as a PDF file
workbook.Save(u"output.pdf", SaveFormat::Pdf);
Aspose::Cells::Cleanup();
return 0;
}