public FileResult DownloadSalesForceTemplate()
        {
            SingelSheetExcelScaffold <SalesForce> scaffod = new SingelSheetExcelScaffold <SalesForce>("SalesForce");

            var memoryStream = new MemoryStream();

            scaffod.GetWorkBook().Write(memoryStream);
            memoryStream.Seek(0, SeekOrigin.Begin);

            string s = MimeMapping.GetMimeMapping(".xls");

            return(File(memoryStream, s, "SalesForce.xls"));
        }
        public FileResult DownloadOracleCost()
        {
            SingelSheetExcelScaffold <OracleCost> scaffod = new SingelSheetExcelScaffold <OracleCost>("OracleCost");

            var memoryStream = new MemoryStream();

            scaffod.GetWorkBook().Write(memoryStream);
            memoryStream.Seek(0, SeekOrigin.Begin);

            string s = MimeMapping.GetMimeMapping(".xls");

            return(File(memoryStream, s, "OracleCost.xls"));
        }
        public FileResult DownloadExchangeRateTemplate()
        {
            SingelSheetExcelScaffold <FlatExchangeRate> scaffod = new SingelSheetExcelScaffold <FlatExchangeRate>("ExchageRate");
            string yearmonth = DateTime.Now.ToString("yyyy/MM");
            int    rowIdex   = 1;

            foreach (var cur in Currency.GetCurrencys(true))
            {
                scaffod.SetCellContentByColumnName(rowIdex, "Currency", cur);
                scaffod.SetCellContentByColumnName(rowIdex, "YearMonthDate", yearmonth);
                rowIdex++;
            }
            var memoryStream = new MemoryStream();

            scaffod.GetWorkBook().Write(memoryStream);
            memoryStream.Seek(0, SeekOrigin.Begin);

            string s = MimeMapping.GetMimeMapping(".xls");

            return(File(memoryStream, s, "ExchangeRate.xls"));
        }