T
TJ
I am having trouble showing the grid lines in my asp to excel app.
A snippet of my code follows:
Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet")
objSpreadsheet.ActiveSheet.Range("A1:E1").Merge
set rngMergedCells =
objSpreadSheet.ActiveSheet.Range("A1").MergeArea
with rngmergedcells
.Value = title
.Font.Bold = True
.HAlignment = 2
.Font.Size = 12
end with
Dim objField, iCol, iRow
iCol = iColOffset
iRow = iRowOffset
For Each objField in objRS.Fields
fieldheader = replace(objField.Name, " ", chr(13), 1)
with objSpreadsheet.Cells(iRow, iCol)
.Value = fieldheader
.HAlignment = 2
.Borders.Color = "Black"
.Interior.Color = "DarkBlue"
.Font.Color = "White"
.Font.Bold = True
end with
iCol = iCol + 1
Next 'objField
I cannot find any resource to help me with this. Most are calling the
cslid and setting params. I already have this class written and
working and just need to turn on the gridlines and bada bing on to
something else. Any suggestions?
A snippet of my code follows:
Set objSpreadsheet = Server.CreateObject("OWC.Spreadsheet")
objSpreadsheet.ActiveSheet.Range("A1:E1").Merge
set rngMergedCells =
objSpreadSheet.ActiveSheet.Range("A1").MergeArea
with rngmergedcells
.Value = title
.Font.Bold = True
.HAlignment = 2
.Font.Size = 12
end with
Dim objField, iCol, iRow
iCol = iColOffset
iRow = iRowOffset
For Each objField in objRS.Fields
fieldheader = replace(objField.Name, " ", chr(13), 1)
with objSpreadsheet.Cells(iRow, iCol)
.Value = fieldheader
.HAlignment = 2
.Borders.Color = "Black"
.Interior.Color = "DarkBlue"
.Font.Color = "White"
.Font.Bold = True
end with
iCol = iCol + 1
Next 'objField
I cannot find any resource to help me with this. Most are calling the
cslid and setting params. I already have this class written and
working and just need to turn on the gridlines and bada bing on to
something else. Any suggestions?