vb.net interfacing with office applications

D

douglas

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!
 
E

eBob.com

Hopefully you'll get other, more helpful replies. But in case you don't,
here's the little bit of help I can offer. NOTE THAT I AM USING OFFICE XP -
I am not sure if that is at the same level as Excel 2003.

douglas said:
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.

I just put the strings I want to use for column headings in the first row of
data. I don't know if you can do better than that in Office XP.

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.

'specify "wrap" for all cells

objSheet.Cells.WrapText = True

Of course that code, above, is setting wrap for all cells. To specify a
particular column I assume you could use code similar to this, below, which
I use to set the width of a particular column.

objSheet.Range("E:E").ColumnWidth = AtTel.ColWidth
 
D

douglas

"eBob.com" :

This kind of answers my question. I am hoeping that I will some more
answers.
Also for your information, I am using office xp also.

Thanks for your assistance!
 
R

Roomy R. Shroff

In \Program Files\Microsoft Office\Office10\1033\VBAXL10.chm there is a
wealth of information available.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top