Renderingsmönster för anpassad datumformat g och ge mm dd med C++
Contents
[
Hide
]
Aspose.Cells kan nu rendera anpassade datumformatmallar som g, ge.mm.dd och liknande. Vänligen kontrollera den bifogade källkalkylbladsfilen och den konverterade PDF:en av Aspose.Cells för din referens.
Följande exempelkod konverterar källkalkylbladsfilen som innehåller datumvärden med anpassade formatmallar som g och ge.mm.dd till utdata-PDF:en.
#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();
}