View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Douglas Douglas is offline
external usenet poster
 
Posts: 35
Default .net data being formatted in excel

Jacob Skaria":

Thank you for your answer but I still have the following questions:

1. Doesn't the code 'ActiveSheet.PageSetup.PrintTitleRows = "$1:$3"' copy
the header information into more worksheets in the same workbook? i am asking
that question since this code referst to the active sheet.
Does this work for copying the header lines into different workbooks? If
not, how do you copy the header information into individual worksheets in
separate workbook? (I am going to generate one worksheet per workbook since
the reports go to different customers.
2. How you you populate the column and page headers where there is one
worksheet per workbook?

"Jacob Skaria" wrote:



"Jacob Skaria" wrote:

I understand you want to populate Column header and Page header in the top
rows. You can have these information populated into the cells and then use
the below code to repeat this section in all pages.

ActiveSheet.PageSetup.PrintTitleRows = "$1:$3"

If this post helps click Yes
---------------
Jacob Skaria


"douglas" wrote:

"Jacob Skaria":

Your reply answers part of my question, thanks!
1. I do not understand your reply for column headers. can you tell me how
the
following code actually accesses the column headers:
For lngCol = 1 to Ubound(arrHeader)
Workbook.Sheets("Sheet1").Cells(1,lngCol) = arrHeader(lngCol)
Next
2. Can you tell me how to put page headers in rows 1 to 3 for each new
worksheet that is created?

Thanks!



"Jacob Skaria" wrote:

'1. Column headers use a loop to update the header columns. Write this as a
separate procedure and call it for each workbook
For lngCol = 1 to Ubound(arrHeader)
Workbook.Sheets("Sheet1").Cells(1,lngCol) = arrHeader(lngCol)
Next
'2. Wrap text. Select the column you need
Workbook.Sheets("Sheet1").Columns("E:E").Select
Selection.WrapText = True


If this post helps click Yes
---------------
Jacob Skaria


"douglas" wrote:

I am writing a Visual Basic.Net 2005 desktop application that exports data to
individual excel 2003 spreadsheets in separate workbooks. (The data is
written to separate workbooks since the workbooks are emailed to different
customers.)

I am exporting all the data I want to the spreadsheets now. However, I
would like to know how to do any of the following:
1. Put the column headers on to the top of each data column.
2. How to put report headers on the first 3 rows of each spreadsheet,
3. How to set the wraparound property one column in particular. I have one
column that is varchar(500) and I want this column to wraparound.

Thanks!