View Single Post
Old 06-06-2006, 12:48 AM   #12
SSG Troyer
All Star Starter
 
SSG Troyer's Avatar
 
Join Date: Dec 2001
Location: Somewhere to the left of 2nd base
Posts: 1,598
I finally wrote an Excel module to convert my spreadsheet into a .lsdl sans header information, which I then text-edited in.

The module reads a sheet I called "DayByDay", and has four columns with a header row of game day, h, a, and time.

The module is very specific to my schedule, but could be reletively easily converted to others. But, I guess, anyone who would bother could have just as easily written their own ... nonetheless, if anyone cares, here it is ...
Code:
Sub CreateIt()

Dim x As Integer
Dim line As String
Set fs = CreateObject("Scripting.FileSystemObject")
Open "c:\ootpb2006\Schedule.lsdl" For Output As #1
Worksheets("DayByDay").Activate
line = "{GAME}"
Print #1, line
For x = 2 To 3985
    line = "{GAME day=" & Chr(34) & Cells(x, 1) & Chr(34) _
            & " time=" & Chr(34) & Cells(x, 4) & Chr(34) _
            & " away=" & Chr(34) & Cells(x, 3) & Chr(34) _
            & " home=" & Chr(34) & Cells(x, 2) & Chr(34) _
            & " /}"
    Print #1, line
Next x
Close #1
End Sub
Note that, because the BBS takes the "less-than" and "greater-than" signs as something else, I had to replace them here with left- and right-braces.
__________________
MWT
Did Tennesee Delaware Mississppi's New Jersey? Idaho ... Alaska!

Last edited by SSG Troyer; 06-06-2006 at 12:52 AM.
SSG Troyer is offline   Reply With Quote