Beispiel #1
0
        //public static SpreadsheetGearSeries ReadFromConnectionString(string connectionString,
        //    string dataPath)
        //{
        //    SpreadsheetGearSeries rval = CreateFromConnectionString(connectionString, dataPath);
        //    rval.Read();
        //    return rval;
        //}



        public static SpreadsheetGearSeries CreateFromConnectionString(string connectionString,
                                                                       string dataPath)
        {
            string fileName = ConnectionStringUtility.GetToken(connectionString, "FileName", "");

            if (!Path.IsPathRooted(fileName))
            {
                fileName = Path.Combine(dataPath, fileName);
            }
            SpreadsheetGearSeries rval = new SpreadsheetGearSeries(
                fileName,
                ConnectionStringUtility.GetToken(connectionString, "SheetName", ""),
                ConnectionStringUtility.GetToken(connectionString, "DateColumn", ""),
                ConnectionStringUtility.GetToken(connectionString, "ValueColumn", ""),
                ConnectionStringUtility.GetBoolean(connectionString, "IsWaterYearFormat", false),
                ConnectionStringUtility.GetToken(connectionString, "SiteColumn", ""),
                ConnectionStringUtility.GetToken(connectionString, "SiteFilter", "")
                );

            return(rval);
        }
Beispiel #2
0
 public static SpreadsheetGearSeries ReadFromWorkbook(IWorkbook workbook, string sheetName, string dateColumn,
     string valueColumn, string siteColumn, string siteFilter, string units)
 {
     SpreadsheetGearSeries s = new SpreadsheetGearSeries(workbook, sheetName, dateColumn, valueColumn,siteColumn, siteFilter,units);
     s.Read();
     return s;
 }
Beispiel #3
0
 public static SpreadsheetGearSeries ReadFromFile(string fileName, string sheetName, string dateColumn,
     string valueColumn)
 {
     SpreadsheetGearSeries s = new SpreadsheetGearSeries(fileName, sheetName, dateColumn, valueColumn);
     s.Read();
     return s;
 }
Beispiel #4
0
 public static SpreadsheetGearSeries ReadFromWorkbook(IWorkbook workbook, string sheetName, string dateColumn,
     string valueColumn, bool isWaterYearformat, string units)
 {
     SpreadsheetGearSeries s = new SpreadsheetGearSeries(workbook, sheetName, dateColumn, valueColumn,isWaterYearformat,units);
     s.Read();
     return s;
 }
Beispiel #5
0
 //public static SpreadsheetGearSeries ReadFromConnectionString(string connectionString,
 //    string dataPath)
 //{
 //    SpreadsheetGearSeries rval = CreateFromConnectionString(connectionString, dataPath);
 //    rval.Read();
 //    return rval;
 //}
 public static SpreadsheetGearSeries CreateFromConnectionString(string connectionString, 
     string dataPath)
 {
     string fileName = ConnectionStringUtility.GetToken(connectionString, "FileName", "");
     if (!Path.IsPathRooted(fileName))
     {
         fileName = Path.Combine(dataPath, fileName);
     }
     SpreadsheetGearSeries rval = new SpreadsheetGearSeries(
         fileName,
         ConnectionStringUtility.GetToken(connectionString, "SheetName", ""),
         ConnectionStringUtility.GetToken(connectionString, "DateColumn", ""),
         ConnectionStringUtility.GetToken(connectionString, "ValueColumn", ""),
         ConnectionStringUtility.GetBoolean(connectionString, "IsWaterYearFormat", false),
         ConnectionStringUtility.GetToken(connectionString,"SiteColumn",""),
         ConnectionStringUtility.GetToken(connectionString,"SiteFilter","")
         );
     return rval;
 }