How can I change the page in writing data to excel file?

using VB.NET,how can i go to next page anytime when i writing data to excel file?
[82 byte] By [BigBoy] at [2007-12-16]
# 1
Hi,
Do you mean Page as in sheets? If yes,
Try setting the Application.ActiveSheet property to the sheet that you want to write data into (if you want to make it visible). Or you could just get a reference on the sheet by using the Sheets Collection in the workbook object.
ThisWorkbook.Sheets["my Sheet"]
cheers,
Paul June A. Domag
PaulDomag at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2

I just want to change page within a sheet. For example, I writing data to a sheet in a workbook,at the first page in this sheet,I wrote two rows,then I want to go to the first row of next page in this sheet.how can I do it?

BigBoy at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3
Hi BigBoy,

I am not sure if I got your question right, but in Excel there is no concept of Pages as in Word. You just keep adding rows. You would probably yourself need to define n number of rows to denote 1 page of data and accordingly add that value to skip that many rows when you write the next data.

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 4
Thank you Vikram!
I did as you said before . But when I difine 40 rows as one page, I may be 41 rows as one page in another printer. So,if I have to do is to change the setting of printer?
BigBoy at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 5
Hi,

I think its based on paper size. If the other printer is also using the same paper size then I guess it would print the same number of rows.

If you are printing programmatically then you can control this.

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 6
Hi,

Thank you Vikram! I see what you meant.So I am trying to control the setting of printer programmatically. Can you give me some code guide or something?

BigBoy at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 7
Hi,

Take a look at the following sample:

Printing in VB.NET
http://www.vbdotnetheaven.com/Code/Jun2003/2087.asp

Regards,
Vikram

Vikram at 2007-9-9 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified