为了提高技术部的工作效率,在两位同事的需求下,开发了个自动生成文本的工具
1.需求:根据不同的业务类型,不同的城市,对从excel中复制过来的数据,进行自动的匹配,分别生成不同格式的文本。
2.开发环境:jdk1.5,sql2000,eclipse3.5,swt开发包
 
程序中最主要的用到了swt的多线程,程序界面如下:
 
用到的存储过程如下:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER      proc create_temp_table_progress
as
 if exists (select * from sysobjects where name = 'temp_group' and xtype = 'u')
  drop table temp_group
 if exists (select * from sysobjects where name = 'group_list' and xtype = 'u')
  drop table group_list
 --生成临时表
 
 select project,city into temp_group from currentSucessList group by project,city
 select t.project,t.city,a.provincename into group_list from temp_group t, areacodetotal a where t.city = a.areaname
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
附上项目文件,哥们如果感兴趣可以下载随便瞅瞅