public static void ExportDDBTableToWorksheet(BasicTable tb, ImportOpt opt) { List <string> format = new List <string>(); for (int i = 0; i != tb.columns(); i++) { DATA_TYPE colType = tb.getColumn(i).getDataType(); format.Add(DDBExcelNumericFormater.GetFormat(colType)); } ExportDataTableToWorksheet(tb.toDataTable(), opt, format); }
public static void ExportDDBTableToWorksheet(DataTable tb, IList <DATA_TYPE> columnsSrcType, ImportOpt opt) { List <string> format = new List <string>(); Debug.Assert(columnsSrcType.Count == tb.Columns.Count); foreach (var dt in columnsSrcType) { format.Add(DDBExcelNumericFormater.GetFormat(dt)); } ExportDataTableToWorksheet(tb, opt, format); }