Esempio n. 1
0
 public void ReadTxtTest()
 {
     string path = @"C:\Users\wangji\Desktop\手簿 Data for Test\收敛手簿 2013-10-10.txt";
     ReadChordFile target = new ReadChordFile(); // TODO: 初始化为适当的值
     ChordLine actual;
     actual = target.ReadTxt(path);
 }
Esempio n. 2
0
        public static string ReadChord(string[] files, string prjName, int RecNo)
        {
            ReadChordFile read = new ReadChordFile();
            ChordSheet sheet = new ChordSheet();
            ChordSheet.PrjName = prjName;
            ChordSheet.RecordNo = RecNo;
            sheet.Lines = read.ReadTxtList(files);

            string exportname = string.Format("{0}工程全站仪收敛观测记录{1}次", prjName, RecNo);
            string templateUrl = HttpContext.Current.Request.ApplicationPath + "/Template/Chord_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);

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