Пример #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     op.ShowDialog();
     op.Multiselect = true;
     //op.FileName
     ReadDataFile.Service.ReadFile read = new ReadFile();
     sheet = new OberveSheet();
     sheet.Lines = read.ReadTxtList(op.FileNames);
 }
Пример #2
0
        public static string ReadLeicaDNA03(string[] files, string prjName, int RecNo, double iAngle)
        {
            ReadFile read = new ReadFile();
            OberveSheet sheet = new ReadDataFile.Model.OberveSheet();
            sheet.Lines = read.ReadTxtList(files);

            string exportname = string.Format("{0}工程水准观测记录{1}次", prjName, RecNo);
            string templateUrl = HttpContext.Current.Request.ApplicationPath + "/Template/DNA03_Template.xls";
            string exportUrl = HttpContext.Current.Request.ApplicationPath + "/Export/" + exportname + ".xls";
            string templetepath = HttpContext.Current.Server.MapPath(templateUrl);
            string exportpath =HttpContext.Current.Server.MapPath(exportUrl);

            OberveSheet.IAngle = iAngle;
            OberveSheet.PrjName = exportname;
            OberveSheet.RecordNo = RecNo;

            ExportFile ex = new ExportFile();
            ex.TemplateFilePath = templetepath;
            ex.ExportFilePath = exportpath;
            ex.Export(sheet);
            return exportname + ".xls";
        }