public void ExportExcelData() { var projectInfo = ProjectInfoDati.GetActualInstance(); var fullClassName = projectInfo.ProjectRuntimeScriptDefines + "." + excelDataClass; var assemblyPath = projectInfo.ProjectRuntimeAssemblyPath; var targetAssembly = Assembly.LoadFile(assemblyPath); var excelDataClassType = targetAssembly.GetType(fullClassName); var excelFileToExport = GlobalExcelPathMap.GetFilename(excelDataClass, projectInfo.DevelopProjectName); ExportExcelDatas(excelDataClassType, excelFileToExport); }
public void ExportAllExcelData() { var projectInfo = ProjectInfoDati.GetActualInstance(); var assemblyPath = projectInfo.ProjectRuntimeAssemblyPath; Assembly targetAssembly = Assembly.LoadFile(assemblyPath); var excelDataClassType = targetAssembly.GetTypes(); var types = targetAssembly.GetTypes(); foreach (var type in types) { if ((typeof(IExcelEntity).IsAssignableFrom(type))) { var excelFileToExport = GlobalExcelPathMap.GetFilename(type.Name, projectInfo.DevelopProjectName); ExportExcelDatas(type, excelFileToExport); } } }