Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 3rd, 2003, 09:03 PM
Registered User
 
Join Date: Aug 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to get data in an excel file ?

Hi every body.
Please help me, I have some problem when I connect to an excel file(using ADO) to collect information. But my problem is : I can't get data correctly. If one column in my excel file contain more than two kinds of data, example : one column contains text and datetime . Then I can't get data correctly, one of them return Null Value.
Here is my coding:
-------------------------
set objConn = server.CreateObject("ADODB.Connection")
strConnect = "DRIVER={Microsoft Excel Driver (*.xls)};Extended Properties=Excel 8.0;HDR=No; DBQ=" & ExcelFileName
objConn.Open strConnect
--------------------------------
//the operation to open a recordset to get sheet1's data
set rs = server.CreateObject("ADODB.Recordset")
rs.open "select * from [sheet1$]",objconn,1,1
-------------------------------------
with :
ExcelFileName : parameter
[/b]

StevenThu





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read data from an excel file diegoblin Beginning VB 6 6 August 31st, 2009 11:04 PM
Read Data from Excel File kiwibey ASP.NET 2.0 Professional 1 December 5th, 2006 11:27 AM
Transferring data from text file to Excel imranshah Excel VBA 0 July 5th, 2006 10:22 AM
How to print data from Report into file Excel?? wwwmdang1983 VB How-To 2 June 16th, 2006 08:45 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.