⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 9_04.asp

📁 《管式加热炉设计计算程序》本程序依据《管式加热炉规范》 SY/T0538-2004进行开发而成。适用于油田、长输管道圆筒型管式加热炉(包括丁头管、翅片管)的热力计算、水力计算、阻力计算及强度计算。
💻 ASP
字号:
<script language="vbscript">
BBB="四、辐射室设计计算"
nnn=43
Sub buildDoc(theTemplate,intTableRows)
  Dim Table1
  set Table1 = document.all.myData
  row = Table1.rows.length
  Set objWordDoc = CreateObject("Word.Document")
  ObjWordDoc.Application.Visible=True
  Dim  theArray(6,1000)
 
  colnum = Table1.rows(1).cells.length
  for i=0 to row-1
    for j=0 to colnum-1
      theArray(j+1,i+1) = Table1.rows(i).cells(j).innerHTML
    next
  next

  intNumrows = nnn

  objWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore(BBB)
  objWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore("")
  objWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertBefore("")

  Set rngPara = objWordDoc.Application.ActiveDocument.Paragraphs(1).Range
  With rngPara
    .Bold = True
    .ParagraphFormat.Alignment = 1
    .Font.Name = "Arial"
    .Font.Size = 12
  End With

  Set rngCurrent = objWordDoc.Application.ActiveDocument.Paragraphs(3).Range
  Set tabCurrent =  ObjWordDoc.Application.ActiveDocument.Tables.Add(rngCurrent,intNumrows,6)

  for i = 1 to colnum
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(1).Cells(i).Range.InsertAfter theArray(i,1)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(1).Cells(i).Range.ParagraphFormat.alignment=1
  next
  tabRow = 2

  For j = 2 to intNumrows
   
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(1).Range.InsertAfter theArray(1,j)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(1).Range.ParagraphFormat.alignment=1
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(2).Range.InsertAfter theArray(2,j)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(2).Range.ParagraphFormat.alignment=1
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(3).Range.InsertAfter theArray(3,j)

    'objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(3).Range.InsertAfter  FormatCurrency(theArray(3,j))
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(3).Range.ParagraphFormat.alignment=2
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(4).Range.InsertAfter theArray(4,j)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(4).Range.ParagraphFormat.alignment=1
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(5).Range.InsertAfter theArray(5,j)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(5).Range.ParagraphFormat.alignment=1
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(6).Range.InsertAfter theArray(6,j)
    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(6).Range.ParagraphFormat.alignment=1
tabRow = tabRow + 1
  
  Next

'    objWordDoc.Application.ActiveDocument.Tables(1).Rows(tabRow).Cells(4).Range.ParagraphFormat.alignment=1

  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter(" ")
  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter(" ")
  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter("Regards,")
  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter(" ")
  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter("Daryl B. Morticum")
  'objWordDoc.Application.ActiveDocument.Paragraph.Add.Range.InsertAfter("Sales Associate")
  'objWordDoc.Application.ActiveDocument.Envelope.Insert Address
  ' objWordDoc.Application.ActiveDocument.Paragraphs.Add.Range.InsertAfter("由廖家远设计")

  objWordDoc.Application.ActiveDocument.SaveAs "tempSample.doc", 0,False,"",True,"",False,False,False, False,False
  'objWordDoc.Application.printout()


End Sub
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -