I'm using VB.net writing out to an Excel file. every thing works fine BUT
the following code does not saved the "PrintTitle Rows " or
"PrintTitleColu mns " information
to the file when the worksheet is display. I can set the fields when the
sheet is displayed in excel but I can't set the data in VB. Any Help??
Thank John
With excelWorksheet. PageSetup
..PrintTitleRow s = "$1:$4"
..PrintTitleCol umns = "$A:$Q"
End With
excelWorksheet. PageSetup.Print Area = ""
With excelWorksheet. PageSetup
..LeftHeader = ""
..CenterHeader = ""
..RightHeader = ""
..LeftFooter = ""
..CenterFooter = ""
..RightFooter = ""
..LeftMargin = excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..RightMargin =
excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..TopMargin = excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..BottomMargin =
excelWorksheet. Application.Inc hesToPoints(0.0 069444444444444 4)
..HeaderMargin = excelWorksheet. Application.Inc hesToPoints(0.5 )
..FooterMargin = excelWorksheet. Application.Inc hesToPoints(0.5 )
..PrintHeadings = False
..PrintGridline s = False
..PrintComments = Excel.XlPrintLo cation.xlPrintN oComments
..PrintQuality = 600
..CenterHorizon tally = False
..CenterVertica lly = False
..Orientation = Excel.XlPageOri entation.xlLand scape
..Draft = False
..PaperSize = Excel.XlPaperSi ze.xlPaperLette r
'.FirstPageNumb er = xlAutomatic
..Order = Excel.XlOrder.x lDownThenOver
..BlackAndWhite = False
..Zoom = 100
..PrintErrors = Excel.XlPrintEr rors.xlPrintErr orsDisplayed
End With
the following code does not saved the "PrintTitle Rows " or
"PrintTitleColu mns " information
to the file when the worksheet is display. I can set the fields when the
sheet is displayed in excel but I can't set the data in VB. Any Help??
Thank John
With excelWorksheet. PageSetup
..PrintTitleRow s = "$1:$4"
..PrintTitleCol umns = "$A:$Q"
End With
excelWorksheet. PageSetup.Print Area = ""
With excelWorksheet. PageSetup
..LeftHeader = ""
..CenterHeader = ""
..RightHeader = ""
..LeftFooter = ""
..CenterFooter = ""
..RightFooter = ""
..LeftMargin = excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..RightMargin =
excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..TopMargin = excelWorksheet. Application.Inc hesToPoints(0.0 034722222222222 2)
..BottomMargin =
excelWorksheet. Application.Inc hesToPoints(0.0 069444444444444 4)
..HeaderMargin = excelWorksheet. Application.Inc hesToPoints(0.5 )
..FooterMargin = excelWorksheet. Application.Inc hesToPoints(0.5 )
..PrintHeadings = False
..PrintGridline s = False
..PrintComments = Excel.XlPrintLo cation.xlPrintN oComments
..PrintQuality = 600
..CenterHorizon tally = False
..CenterVertica lly = False
..Orientation = Excel.XlPageOri entation.xlLand scape
..Draft = False
..PaperSize = Excel.XlPaperSi ze.xlPaperLette r
'.FirstPageNumb er = xlAutomatic
..Order = Excel.XlOrder.x lDownThenOver
..BlackAndWhite = False
..Zoom = 100
..PrintErrors = Excel.XlPrintEr rors.xlPrintErr orsDisplayed
End With