Skip to main content
Inspiring
November 17, 2008
Question

creating excel file from query

  • November 17, 2008
  • 2 replies
  • 757 views
I'm trying to create a spreadsheet of contact names on the fly using the code attached. I have a few roblems with this though.

I'd like to download the file by clicking a link, do you know how I can do this? Currently it downloads it when you browse to the page.

Also, I have a cfoutput tag in the footer of my page, this gets included in the spreadsheet, do you know how I can eliminate this?

Thankyou
    This topic has been closed for replies.

    2 replies

    matthiscoAuthor
    Inspiring
    November 18, 2008
    Does anyone know if formatting of the excel document is possible?

    I would like to use the table header and split the window and free the frame.

    Excel> Window> Freeze pane

    Thankyou
    November 18, 2008
    Put this in the <HEAD> you'll have to google for what each of these are, I don't recall them all. I think you are interested in this particularly:
    <x:SplitHorizontal>1</x:SplitHorizontal> and/or <x:TopRowBottomPane>1</x:TopRowBottomPane>

    <!--[if gte mso 9]><xml>
    <x:ExcelWorkbook>
    <x:ExcelWorksheets>
    <x:ExcelWorksheet>
    <x:Name>Actions with Bad Codes</x:Name>
    <x:WorksheetOptions>
    <x:FitToPage/>
    <x:Print>
    <x:FitHeight>999</x:FitHeight>
    <x:ValidPrinterInfo/>
    <x:HorizontalResolution>300</x:HorizontalResolution>
    <x:VerticalResolution>300</x:VerticalResolution>
    </x:Print>
    <x:DoNotDisplayGridlines/>
    <x:FreezePanes/>
    <x:FrozenNoSplit/>
    <x:SplitHorizontal>1</x:SplitHorizontal>
    <x:TopRowBottomPane>1</x:TopRowBottomPane>
    <x:ActivePane>2</x:ActivePane>
    <x:Panes>
    <x:Pane>
    <x:Number>3</x:Number>
    </x:Pane>
    <x:Pane>
    <x:Number>2</x:Number>
    <x:ActiveRow>1</x:ActiveRow>
    <x:ActiveCol>1</x:ActiveCol>
    </x:Pane>
    </x:Panes>
    <x:ProtectContents>False</x:ProtectContents>
    <x:ProtectObjects>False</x:ProtectObjects>
    <x:ProtectScenarios>False</x:ProtectScenarios>
    </x:WorksheetOptions>
    </x:ExcelWorksheet>
    </x:ExcelWorksheets>
    <x:ProtectStructure>False</x:ProtectStructure>
    <x:ProtectWindows>False</x:ProtectWindows>
    </x:ExcelWorkbook>
    </xml><![endif]-->
    davidsimms
    Inspiring
    November 17, 2008
    "I'd like to download the file by clicking a link, do you know how I can do this? Currently it downloads it when you browse to the page."

    Wouldn't one browse to the page by clicking a link? Seems like you've answered your own question.
    matthiscoAuthor
    Inspiring
    November 17, 2008
    Ah yes of course, sorry todays been hectic, my minds screwed.

    Thanks for your reply