C++を使用したカスタム日付書式パターンgとgeのレンダリング
Contents
[
Hide
]
Aspose.Cellsは、今やgやge.mm.ddなどのカスタム日付形式パターンをレンダリングすることができます。参考のために、添付のsource excel fileとAspose.Cellsによる変換されたPDFをご確認ください。
以下のサンプルコードは、gやge.mm.ddなどのカスタム形式パターンを含むsource excel fileを変換し、output 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\\");
// 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();
}