the following code can be used for Excel automation using VB.Net
Excel Automation
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
' An Excel spreadsheet involves a hierarchy of objects, from Application
' to Workbook to Worksheet.
Dim excelApp As New Excel.Application()
Dim excelBook As Excel.Workbook = excelApp.Workbooks.Add
Dim excelWorksheet As Excel.Worksheet = _
CType(excelBook.Worksheets(1), Excel.Worksheet)
' Unlike the Word demo, we'll make the spreadsheet visible so you can see
' the data being entered.
excelApp.Visible = True
With excelWorksheet
' Set the column headers and desired formatting for the spreadsheet.
.Columns().ColumnWidth = 21.71
.Range("A1").Value = "Item"
.Range("A1").Font.Bold = True
.Range("B1").Value = "Price"
.Range("B1").Font.Bold = True
.Range("C1").Value = "Calories"
.Range("C1").Font.Bold = True
' Start the counter on the second row, following the column headers
Dim i As Integer = 2
' Loop through the Rows collection of the DataSet and write the data
' in each row to the cells in Excel.
Dim dr As DataRow
For Each dr In dsMenu.Tables(0).Rows
.Range("A" & i.ToString).Value = dr("Item")
.Range("B" & i.ToString).Value = dr("Price")
.Range("C" & i.ToString).Value = dr("Calories")
i += 1
Next
' Select and apply formatting to the cell that will display the calorie
' average, then call the Average formula. Note that the AVERAGE function
' is localized, so the below code may need to be updated based on the
' locale the application is deployed to.
.Range("C7").Select()
.Range("C7").Font.Color = RGB(255, 0, 0)
.Range("C7").Font.Bold = True
excelApp.ActiveCell.FormulaR1C1 = "=AVERAGE(R[-5]C:R[-1]C)"
End With
End Sub
Speak merlin
' Handles the Speak button click event, which makes Merlin say whatever the
' user enters into the TextBox.
Private Sub btnSpeak_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSpeak.Click
If Not txtSpeak.Text = "" Then
agentCharacter.Speak(txtSpeak.Text)
End If
End Sub
To animate merlin
' Handles the click events of all the Merlin animations.
Private Sub rdoAnimations_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles optDontRecognize.Click, optWrite.Click, optWave.Click, optApplaud.Click, optSurprised.Click, optSuggest.Click, optAnnounce.Click, optDoMagic.Click, optExplain.Click, optCongrats.Click
' Have Merlin immediately cease what he is doing when the user selects a
' new animation, or else the animations will stack up in a queue and might
' appear not to work when selected.
agentCharacter.StopAll()
Dim radio As RadioButton = CType(sender, RadioButton)
Dim radioTag As String = CStr(radio.Tag)
With agentCharacter
Select Case radioTag
Case "GetAttention"
.Play("GetAttention")
.Play("GetAttentionReturn")
Case "Explain"
.Play("Explain")
Case "Congratulate"
.Play("Congratulate")
Case "Announce"
.Play("Announce")
Case "Applaud"
.Play("Congratulate_2")
Case "DontRecognize"
.Play("DontRecognize")
Case "Write"
.Play("Write")
Case "Surprised"
.Play("Surprised")
Case "Suggest"
.Play("Suggest")
Case "Wave"
.Play("Wave")
End Select
End With
End Sub
To hide merlin
' Handles the CheckChanged event for the checkbox that hides or shows Merlin.
Private Sub chkMerlinOnOff_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkMerlinHide.CheckedChanged
With agentCharacter
If chkMerlinHide.Checked Then
.StopAll()
.Hide()
Else
.Show()
End If
End With
End Sub
Civil Engineerz is a primary plat form for Civil Engineering students and professionals, where they can share their valuable experience and knowledge.
Search This Blog
Wednesday, May 26, 2010
Joint Fillers
Joint Fillers
Definition:-“Joints fillers are the strips of some compressible material which is used tofill the expansion joints in different structure “.
Joint filling is an important process in many structures such as Buildings, Masonry Walls.
Highways, Dams, Reserviover et cetera.
A joint filler for use in joints between structural elements comprising: at least one layer
of a substantially non-compressible, moisture blocking material; at least two layers of a
compressible and resilient, moisture blocking material, each layer being in surface to
surface contact with a layer of non-compressible material; the layers of material are
combined to form a strip of interleaved compressible and non-compressible layers, and in
an uncompressed state thicker than a joint.
The followings are the different requirements of good joint filler.
- The ability to create an effective water seal.
- It should absorb the impact and shock of heavy loads and steel wheeled traffic,
- preventing erosion of control joint edges.
- The ability to expand and contract, as the joint widens or narrows in response to
- environmental or other conditions, while maintaining an effective seal against the
- sides of the joint.
- It should be durable and economical.
- The ability to flex in every direction, as the joint flexes due to structural
- conditions, loading, or environmental conditions, while maintaining an effective
- seal against the sides of the joint;
- It must give aesthetically acceptable appearance;
- the capability of being installed in a joint by fairly unskilled labour;
- It must posses’ long life, Wear resistant, durable and resilient; it does not harden
- or become brittle with age.
- The ability to adhere to numerous surface materials, such as concrete, steel, or
- aluminum without extensive or expensive surface preparations.
- The ability to fit into joints of a large variety of widths.
- It must posses’ Small density, high recovery rate, with independent air bubble
- structure.
- Low surface water absorption rate with good seepage resistance.
- Good resistance to corrosion of acid, alkali, salt and oil among other organic
- solvents and good resistance to aging.
- No flowing under high temperature and no cracking under low temperature.
- Flexibility provides for joint movement and protects slabs edges from chipping
- Cures on damp or wet surfaces
- Penetrates and fills without running
- Flexible enough to absorb hard heavy wheeled traffic.
- The ability to reduce stress cracking and telegraphing.
- The ability to bonds tightly to the sides of the concrete joint prevents contaminant
- penetration and delivers high wear resistance and durability.
- It should be environment friendly.
- It must have uniform consistency with no measurable shrinkage.
- It must posses’ adequate tensile strength. As tensile strength relates to the
- capacity of this material to hold together when stretched. Percentage tensile
- elongation is the length the material can be stretched before failure.
- It must deliver adequate support to joint shoulders receiving the force of hard
- Delivers tight bond to faces of joint
Tuesday, May 25, 2010
civil engineer
positions for civil engineers are availeble for further information please contact syed_engrs@yahoo.com
Subscribe to:
Posts (Atom)