Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Saving Report in MS Excel (.xls) format

soumenbiswassoumenbiswas Member Posts: 15
How can I save report generated by my VC++/MFC application in Microsoft Excel format (.xls) with keeping intact the Header (containing the Title and other details) and Footer (containing the Legends).

Comments

  • rvictarvicta Member Posts: 1
    : How can I save report generated by my VC++/MFC application in
    : Microsoft Excel format (.xls) with keeping intact the Header
    : (containing the Title and other details) and Footer (containing the
    : Legends).

    Not sure if you still need this answer since it's a few weeks old, but I thought I'd answer what I can.

    First, you need the PageSetup class from your Excel type library. The function you're looking for is SetPrintTitleRows.

    The following
    [b]pagesetup.SetPrintTitleRows( "$1:$5" );[/b]
    would be used to repeat the first 5 rows on each page.


    As far as the Footer goes, I'm not sure what your talking about with the Legend. Are you talking about the Tab names for the individual spreadsheets?

Sign In or Register to comment.