示例#1
0
 internal static void SetCellFromString(ExcelFile Workbook, int r, int c, string p, string[] DateFormats)
 {
     if (Workbook.VirtualMode)
     {
         int       XF = FlxConsts.DefaultFormatId;
         CellValue cv = new CellValue(Workbook.ActiveSheet, r, c, Workbook.ConvertString(new TRichString(p), ref XF, DateFormats), -1);
         if (cv.Value is DateTime)
         {
             cv.Value = TExcelTypes.ConvertToAllowedObject(cv.Value, Workbook.OptionsDates1904);
         }
         cv.XF = XF;
         Workbook.OnVirtualCellRead(Workbook, new VirtualCellReadEventArgs(cv));
     }
     else
     {
         Workbook.SetCellFromString(r, c, p, DateFormats);
     }
 }