Excel报表统计

'Print |正在统计,请稍候...|
 Print |<script language="javascript">   |
 Print |<!--
      var oXL
      var oBook
      var oSheet1
  var oXL = new ActiveXObject("Excel.Application");       
      oBook = oXL.Workbooks.Add();
      oSheet1 = oBook.ActiveSheet; 
  oSheet1.Name = "IP-ASIC-Simulation";
  oXL.sheets(oSheet1.Name).Select;
  oXL.Range("A1:G1").Select;
  oXL.Selection.RowHeight = 28.50;
  oXL.Selection.HorizontalAlignment = 3;
  oXL.Selection.VerticalAlignment = 3 ;
  oXL.Selection.Font.Name = "宋体";
  oXL.Selection.Font.FontStyle = "加粗";
  oXL.Selection.Font.Size = 10;
  oXL.Selection.Interior.ColorIndex = 19;
  oXL.Selection.Borders.LineStyle = 1;
  oSheet1.Cells(1,1).Value = "Customer's Project";
  oSheet1.Cells(1,2).Value = "SH Project";  
  oSheet1.Cells(1,3).Value = "GID";
  oSheet1.Cells(1,4).Value = "RD Users";
    oSheet1.Cells(1,5).Value = "Layout Users";
  oSheet1.Cells(1,6).Value = "Created Time";
  oSheet1.Cells(1,7).Value = "Update Time";
  oXL.Selection.Columns.AutoFit;
  oXL.Selection.Rows.AutoFit;
  |  
 i = 2 
 
 While Not (doc Is Nothing)
  Print |oSheet1.Cells(| & Cstr(i) & |,1).Value = "| & Cstr(doc.Plan_Code_Sunplus(0)) &     |";|
  Print |oSheet1.Cells(| & Cstr(i) & |,2).Value = "| & Cstr(doc.Plan_Code_Sh(0)) &   |";|
  Print |oSheet1.Cells(| & Cstr(i) & |,3).Value = "| & Cstr(ProfileDoc.GID(0)+i-2) &    |";|
  'RDUser和LayoutUser
  For j=1 To doc.num(0)   
   strItemName   = "LoginName" & j
   Set item      = doc.GetFirstItem(strItemName)
   strUserList = strUserList + item.Text+","
  Next
  Print |oSheet1.Cells(| & Cstr(i) & |,4).Value = "| & strUserList &     |";|
  Print |oSheet1.Cells(| & Cstr(i) & |,5).Value = "| & strUserList &     |";|
  Print |oSheet1.Cells(| & Cstr(i) & |,6).Value = "| & Cstr(doc.Created) &    |";|
  Print |oSheet1.Cells(| & Cstr(i) & |,7).Value = "| & Cstr(doc.ChangeDate(0)) &   |";|
  
  i = i+1 
  Print |
   oXL.sheets(oSheet1.Name).Select;
   oXL.Range(oSheet1.Cells(2,1),oSheet1.Cells(| & Cstr(i) & |-1,7)).Select;
   oXL.Selection.Font.Name = "宋体";
   oXL.Selection.Font.Size = 10;
   oXL.Selection.Borders.LineStyle = 1;
   oXL.ReferenceStyle = 1;
   oXL.Range("A1").Select;
    |  
  Set doc  = vw.GetNextDocument(doc)
 Wend
 
 Print |oXL.Visible  =  true; |
 Print |window.history.go(-1); |
 'Print |window.close();  |
 Print |-->    |
 Print |</script>   |

posted on 2010-04-08 19:39 明高 阅读(183) 评论(0)  编辑  收藏 所属分类: Lotus


只有注册用户登录后才能发表评论。


网站导航:
 
<2010年4月>
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678

导航

统计

常用链接

留言簿

随笔分类

随笔档案

搜索

最新评论

阅读排行榜

评论排行榜