将日期转换为日本日期

Contents
[ ]

Aspose.Cells提供一种将公历日期转换为日本日期的方式。在此转换过程中,还会考虑时代变化。以下代码片段将包含公历日期的源Excel文件(90112015.xlsx)转换为包含日本日期的output PDF,如下图所示。

todo:image_alt_text

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
//Source directory
string sourceDir = RunExamples.Get_SourceDirectory();
//Output directory
string outputDir = RunExamples.Get_OutputDirectory();
LoadOptions options = new LoadOptions(LoadFormat.Xlsx);
options.CultureInfo = new CultureInfo("ja-JP");
Workbook workbook = new Workbook(sourceDir + "JapaneseDates.xlsx", options);
workbook.Save(outputDir + "JapaneseDates.pdf", SaveFormat.Pdf);