Results 1 to 4 of 4

Thread: [RESOLVED] reporting in excel

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Resolved [RESOLVED] reporting in excel

    well, my last post/question fizzled out miserably. so now i am focusing on useing excel as the reporting tool. i have a couple of questions(again).

    first one, how do i change the print layout to landscape?

    second one, the more important and complicated one....
    file->page setup->sheet tab
    there is an option for repeating certain cells as headers (rows on top & columns on left). how do i access them from vb?

    bear in mind that i will be creating a new excel workbook and worksheet.

    any help in this matter will be highly appreciated....

  2. #2
    Fanatic Member noielen's Avatar
    Join Date
    Nov 2005
    Location
    Cebu, Phil.
    Posts
    680

    Re: reporting in excel

    you can do that only in EXCEL apps... no other solution

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: reporting in excel

    As with anything in Excel, if you want to add the functionality to your program (which uses Excel) you can simply record a Macro of the actions, then use the code that is provided.

    Admittedly you should remove most of the code in situations like this, as many other options are set too.

    I recorded macros, and here is the code you want:
    VB Code:
    1. [b][i]sheet_object[/i][/b].PageSetup.Orientation = xlLandscape
    2.  
    3. [b][i]sheet_object[/i][/b].PageSetup.PrintTitleRows = "$1:$7"
    4. [b][i]sheet_object[/i][/b].PageSetup.PrintTitleColumns = "$A:$C"

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    May 2003
    Location
    Sydney
    Posts
    1,123

    Re: reporting in excel

    sorry noielen, i got all my answers from si here....
    works like a charm, and more...
    he just showed me the way to work with excel's page setups....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width