Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Load value from Excel spreadsheet to ASP page

Posted on 2004-10-19
3
Medium Priority
?
315 Views
Last Modified: 2010-04-06
I have an excel spreadsheet on the server and would like to view the information on a page using classic ASP.

Any suggestions on how to code this?  Thanks in Advance...
0
Comment
Question by:sl1nger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Assisted Solution

by:erichranz
erichranz earned 800 total points
ID: 12350506
This is a great source of info: http://algonquinstudios.com/article_215.html
0
 

Author Comment

by:sl1nger
ID: 12371344
That looks like the correct example, but now I have a problem importing the data back into excel

- Microsoft JET Database Engine: The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data.  

I know that the field length is greater than 255 characters, but the information was previously in excel.  I think as a text wrap.

Have you seen this before?
0
 
LVL 2

Accepted Solution

by:
JuergenHartl earned 1200 total points
ID: 12393243
do not us the excel ODBC driver, but use excel itself to deliver the data. Why ? ODBC only works on DB like worksheets but not on gerneric worksheets!
here is a routine to read data from an excel worksheet:

dim fname ' excel filename
dim sh_name ' name of sheet to use
dim ex, sh, wb
dim r ' cell to retieve
fname="f:\demodata\book1.xls" ' **** adjust here
sh_name="sheet 1"                   ' **** adjust here
r="a1"                                      ' **** adjust here
set ex=server.CreateObject("Excel.Application")
set wb = ex.Workbooks.Open(f_name, , True)
wb.sheets(sh_name).activate       ' activate the sheet
set sh=wb.activesheet                
response.write sh.range(r).value  ' get a value
wb.close false                             ' close workbook without saving
ex.Quit                                       ' quit excel

you could write data back in a similar manner.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question