Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 84333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:54:51+00:00 2026-05-10T21:54:51+00:00

I’ve been trying to fix this for two hours straight and I can’t figure

  • 0

I’ve been trying to fix this for two hours straight and I can’t figure it out.

onclick = 'location='exceltest.asp?vanjaar=<%=vanjaar%>&vanmaand=<%=vanmaand%>&vandag=<%=vandag%>&totjaar=<%=totjaar%>&totmaand=<%=totmaand%>&totdag=<%=totdag%>'' 

That line of code is in an < input type=’button’ /> attribute. The button links to a page where an Excel download should be triggered. The values in the URL are from- and to-date-parts. (year, month, day)

this:

onclick = 'location='exceltest.asp?fromdate=<%=fromdate%>&todate=<%=todate%>'' />  

does not work, because somehow IE7 reads the date (eg. 2008/1/1) wrong. Something to do with the slashes I think.

But when I try to click the button in IE and thus download the generated file, Internet explorer tries do download the file

exceltest.asp?vanjaar=2008vanmaand=1vandag=1totjaar=2008totmaand=2totdag=1

instead of the excel file I want.
FF offers to download the excelfile, but gives (in that excelfile) an overview of an htmlpage with an errormessage telling me my query is wrong (Item cannot be found in the collection corresponding to the requested name or ordinal.) But that CAN’T be, I’m using that exact same query elsewhere, using the same (but restarted) connection.

This is the bit of code I use to instantiate the download of the file:

Response.Buffer = TRUE   Response.ContentType = 'application/vnd.ms-excel'   Response.AddHeader 'content-disposition', 'attachment; filename=overicht.xls'   

There might actually being to things going on here, but I am most insterested in why IE wants to download the asp page and FF offers the right download.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:54:52+00:00Added an answer on May 10, 2026 at 9:54 pm

    Something that might help: Server.URLEncode

    fromdate=<%=Server.URLEncode(fromdate)%> 

    But, your Excel file error — Item cannot be found in the collection corresponding to the requested name or ordinal. — is from Recordset.Fields(). You’re trying to grab a field that isn’t available — either a column name that isn’t in your query or an index that’s beyond your column count.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.