Benutzerdefiniertes Datumsmuster g und ge mm dd mit C++ rendern
Contents
[
Hide
]
Aspose.Cells kann jetzt benutzerdefinierte Datumsformatmuster wie g, ge.mm.tt und ähnliche rendern. Bitte überprüfen Sie die angehängte Quellexceldatei und die konvertierte PDF-Datei von Aspose.Cells zu Ihrer Referenz.
Der folgende Beispielcode wandelt die Quellexceldatei um, die Datumsangaben mit benutzerdefinierten Formatmustern wie g und ge.mm.tt enthält, in eine Ausgabedatei im PDF-Format um.
#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\\");
// Output directory path
U16String outDir(u"..\\Data\\02_OutputDirectory\\");
// Create workbook from an existing Excel file
U16String inputFilePath = srcDir + u"SourceFile.xlsx";
Workbook workbook(inputFilePath);
// Save the Excel file as PDF
workbook.Save(outDir + u"CustomDateFormat_out.pdf");
std::cout << "File saved successfully as PDF!" << std::endl;
Aspose::Cells::Cleanup();
}