This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| %w( yaml pp win32ole ).each { |dep| require dep } | |
| class WIN32OLE | |
| def self.get_project | |
| begin | |
| connect('MSProject.Application') | |
| rescue WIN32OLERuntimeError => e | |
| new('MSProject.Application') | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub test() | |
| Dim tbl As Word.Table | |
| Dim c As Long | |
| Dim n As Long | |
| Set tbl = Word.Selection.Tables(1) | |
| c = 0 | |
| For n = 1 To tbl.Rows.Count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Public Sub DoIt() | |
| Dim rge As Excel.Range | |
| Dim my_row As Long | |
| Set rge = Application.Selection | |
| rge.Copy | |
| my_row = rge.Row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub Macro3() | |
| Dim sht As Excel.Worksheet | |
| Dim rge As Excel.Range | |
| Dim switch As String | |
| Set sht = Excel.Worksheets("SUMMARY") | |
| lastRow = sht.Range("B65536").End(xlUp).Row |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://effbot.org/tkinterbook/place.htm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pprint | |
| def pad_left(n, width, pad=" "): | |
| return ((pad * width) + str(n))[-width:] | |
| data = """ | |
| SERVER|IP_ADDR|LOCATION|PCN | |
| NH-SRV01|10.97.9.30|SUB704|HUB | |
| NH-SRV05|10.97.9.34||HUB | |
| NH-SRV07|10.97.9.40|SUB501|HUB |
OlderNewer