回复 1楼mm640803的帖子
请问您是如何设置的格式信息?我通过以下代码没有重现问题,请尝试:
- private void Window_Loaded(object sender, RoutedEventArgs e)
- {
- gcSpreadSheet1.Sheets[0].Cells[0, 1].Formatter = new GrapeCity.Windows.SpreadSheet.Data.GeneralFormatter(GrapeCity.Windows.SpreadSheet.Data.FormatMode.CustomMode, "yyyy/MM/dd");
- gcSpreadSheet1.Sheets[0].SetValue(0, 1, new DateTime(2011, 2, 9));
- }
- private void button1_Click(object sender, RoutedEventArgs e)
- {
- gcSpreadSheet1.SaveExcel("test.xlsx", GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX);
- }
复制代码 |