OWC11 Excel PrintArea

B

Ben

Hi,

I am writing an ASP.NET application that is using OWC11. I have a template
file that I convert to an excel.xml spreadsheet for use as a template to
OWC11. In my template I have set a print area that repeats as a header for
each page of data. When I load the template and add data to the spreadsheet
and save it to a .xls file via OWC11, the printarea is off. The selected
header is still correct and repeating, but instead of the printarea spanning
columns 1-7 as it was supposed to, it spans 1-5 and then 6-7. I look at the
object browser and see that there is a PrintArea defined inside PageSetup
for the WorkSheetClass, but I can't seem to access it programmatically.

Can anyone tell me how to tweak my template or programmatically access the
PrintArea via OWC11? (If possible)

Thanks,
Ben
 
A

Alvin Bruney [MVP - ASP.NET]

yes it is.

to answer your question, printing functionality is the responsibility of the
hosting container. the owc does not offer support for this type of
functionality. currently, microsoft has released an approach (available in
the toolpack) that provides substantial printing control from the owc. you
may want to examine that strategy to see if it fits your need.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 
B

Ben

I guess I'm not understanding the 'pringing functionality is the
reponsibility of the hosting container' part of your response.

Excel defines a Print Area on each worksheet of a workbook: File -> Page
Setup -> Sheet -> Print Area
There is also, Rows to repeat at top and columns to repeat at left.

These settings can be saved in a spreadsheet and persist just fine.

Now, in my template say I've defined the print area as being all rows for
columns a - h. Somewhere between OWC loading the template and saving the
output, the print area reduces to all rows for columns a - e, with g & h
printing on sperate pages...


Does that make my problem clearer?


Alvin Bruney said:
yes it is.

to answer your question, printing functionality is the responsibility of
the hosting container. the owc does not offer support for this type of
functionality. currently, microsoft has released an approach (available in
the toolpack) that provides substantial printing control from the owc. you
may want to examine that strategy to see if it fits your need.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ben said:
Is this group covered by the MSDN support?
 
A

Alvin Bruney [MVP - ASP.NET]

Somewhere between OWC loading the template and saving the output, the
print area reduces to all rows for columns a - e, with g & h printing on
sperate pages...

that's what i mean, owc does not let you control printing options. I don't
know of a way to force this behavior to occur. instead, the printing
functionality defaults to whatever the hosting container (a browser) wants
to print.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ben said:
I guess I'm not understanding the 'pringing functionality is the
reponsibility of the hosting container' part of your response.

Excel defines a Print Area on each worksheet of a workbook: File -> Page
Setup -> Sheet -> Print Area
There is also, Rows to repeat at top and columns to repeat at left.

These settings can be saved in a spreadsheet and persist just fine.

Now, in my template say I've defined the print area as being all rows for
columns a - h. Somewhere between OWC loading the template and saving the
output, the print area reduces to all rows for columns a - e, with g & h
printing on sperate pages...


Does that make my problem clearer?


Alvin Bruney said:
yes it is.

to answer your question, printing functionality is the responsibility of
the hosting container. the owc does not offer support for this type of
functionality. currently, microsoft has released an approach (available
in the toolpack) that provides substantial printing control from the owc.
you may want to examine that strategy to see if it fits your need.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ben said:
Is this group covered by the MSDN support?
Hi,

I am writing an ASP.NET application that is using OWC11. I have a
template file that I convert to an excel.xml spreadsheet for use as a
template to OWC11. In my template I have set a print area that repeats
as a header for each page of data. When I load the template and add
data to the spreadsheet and save it to a .xls file via OWC11, the
printarea is off. The selected header is still correct and repeating,
but instead of the printarea spanning columns 1-7 as it was supposed
to, it spans 1-5 and then 6-7. I look at the object browser and see
that there is a PrintArea defined inside PageSetup for the
WorkSheetClass, but I can't seem to access it programmatically.

Can anyone tell me how to tweak my template or programmatically access
the PrintArea via OWC11? (If possible)

Thanks,
Ben
 
B

Ben

I think I was asking the wrong question before. After looking at things a
bit more closely, I'm now wondering if it's possible to set the PageBreaks
programmatically?

This seems to be a strange problem... When I have the template with no data
in it, there are no page breaks. When I process the template and add data
to it, bam, a page break is added in somehow. The weird part... If I copy
the data from the processed template and paste it into the empty template,
no page break is added. OWC11 Doesn't seem to expose VPageBreaks, but is
there some way to specify this via my template or an unknown accessor in
OWC11?

Thanks,
Ben


Alvin Bruney said:
Somewhere between OWC loading the template and saving the output, the
print area reduces to all rows for columns a - e, with g & h printing on
sperate pages...

that's what i mean, owc does not let you control printing options. I don't
know of a way to force this behavior to occur. instead, the printing
functionality defaults to whatever the hosting container (a browser) wants
to print.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Ben said:
I guess I'm not understanding the 'pringing functionality is the
reponsibility of the hosting container' part of your response.

Excel defines a Print Area on each worksheet of a workbook: File -> Page
Setup -> Sheet -> Print Area
There is also, Rows to repeat at top and columns to repeat at left.

These settings can be saved in a spreadsheet and persist just fine.

Now, in my template say I've defined the print area as being all rows for
columns a - h. Somewhere between OWC loading the template and saving the
output, the print area reduces to all rows for columns a - e, with g & h
printing on sperate pages...


Does that make my problem clearer?


Alvin Bruney said:
yes it is.

to answer your question, printing functionality is the responsibility of
the hosting container. the owc does not offer support for this type of
functionality. currently, microsoft has released an approach (available
in the toolpack) that provides substantial printing control from the
owc. you may want to examine that strategy to see if it fits your need.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
Is this group covered by the MSDN support?
Hi,

I am writing an ASP.NET application that is using OWC11. I have a
template file that I convert to an excel.xml spreadsheet for use as a
template to OWC11. In my template I have set a print area that
repeats as a header for each page of data. When I load the template
and add data to the spreadsheet and save it to a .xls file via OWC11,
the printarea is off. The selected header is still correct and
repeating, but instead of the printarea spanning columns 1-7 as it was
supposed to, it spans 1-5 and then 6-7. I look at the object browser
and see that there is a PrintArea defined inside PageSetup for the
WorkSheetClass, but I can't seem to access it programmatically.

Can anyone tell me how to tweak my template or programmatically access
the PrintArea via OWC11? (If possible)

Thanks,
Ben
 

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