473,385 Members | 1,333 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Export ms-access tables information to excel using ASP Code

Hello,

how to export ms-access tables information to excel sheet using ASP. please
give sample code.

it is very urgent to me or if u have no idea please give any news group to
solve my question's answer.

Thanks in advance.
Gaffar.
Jul 22 '05 #1
3 3649
Dim oADO : Set oADO = CreateObject("ADODB.Connection")
oADO.Open "your connection string"
Set oRS = oADO.Execute("SELECT stuff FROM table")
If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
oFile.Write sCSV
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing

Ray at work

"Gaffar" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

how to export ms-access tables information to excel sheet using ASP. please give sample code.

it is very urgent to me or if u have no idea please give any news group to
solve my question's answer.

Thanks in advance.
Gaffar.

Jul 22 '05 #2
Hello
good morning thanks for your reply. the code which you have sent is working
for a single worksheet. but our requirement is to export the datat to
multiple worksheets.
Please help the code. waiting for your reply.

Regards
gaffar & sreedevi

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:ex**************@tk2msftngp13.phx.gbl...
Dim oADO : Set oADO = CreateObject("ADODB.Connection")
oADO.Open "your connection string"
Set oRS = oADO.Execute("SELECT stuff FROM table")
If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
oFile.Write sCSV
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing

Ray at work

"Gaffar" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

how to export ms-access tables information to excel sheet using ASP.

please
give sample code.

it is very urgent to me or if u have no idea please give any news group to solve my question's answer.

Thanks in advance.
Gaffar.


Jul 22 '05 #3
I think you should look into using a technology that is not ASP then. Excel
automation. Have Excel import data from a database. See
microsoft.public.excel.programming, for example.

Ray at work

"sridevi" <sr*****@nannacomputers.com> wrote in message
news:eF**************@TK2MSFTNGP14.phx.gbl...
Hello
good morning thanks for your reply. the code which you have sent is working for a single worksheet. but our requirement is to export the datat to
multiple worksheets.
Please help the code. waiting for your reply.

Regards
gaffar & sreedevi

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:ex**************@tk2msftngp13.phx.gbl...
Dim oADO : Set oADO = CreateObject("ADODB.Connection")
oADO.Open "your connection string"
Set oRS = oADO.Execute("SELECT stuff FROM table")
If Not oRS.EOF Then sCSV = oRS.GetString(,,",",vbCrLf)
oRS.Close : Set oRS = Nothing
oADO.Close : Set oADO = Nothing

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile("C:\Path\file.csv")
oFile.Write sCSV
oFile.Close : Set oFile = Nothing
Set oFSO = Nothing

Ray at work

"Gaffar" <ga****@nannacomputers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

how to export ms-access tables information to excel sheet using ASP. please
give sample code.

it is very urgent to me or if u have no idea please give any news
group to solve my question's answer.

Thanks in advance.
Gaffar.



Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ilya Bari | last post by:
Howdy! Does any of you good folk know how to change window size of the DTS Import/Export Wizard window? Darn thing is very small and inconvinient to work with, no apparent way to change it's...
2
by: BUSHII | last post by:
I have big problem. In database MyDB.mdb I have table for example: ORDERS with colums: - Id int - Name varchar(20) Also I create same table in SQL Server 2k. I can manualy export this data...
0
by: Tom Gao | last post by:
hi guys I'm trying to export an aspx page to msword. ############# I know you can do Response.Clear(); Response.ContentType="application/msword";
205
by: Jeremy Siek | last post by:
CALL FOR PAPERS/PARTICIPATION C++, Boost, and the Future of C++ Libraries Workshop at OOPSLA October 24-28, 2004 Vancouver, British Columbia, Canada http://tinyurl.com/4n5pf Submissions
3
by: DaveR | last post by:
When I export a table from my local SQL Server to my web-host's SQL Server, the primary key never seems to export. This happens whether I use the "Copy tables and views..." option or the "Copy...
1
by: quinniii | last post by:
I have a query where I am trying to export a column that has around 2000 characters and it is truncated. What is not setup in MS SQL correctly so that DTS will export the csv correctly. Thanks,...
1
by: sb Luis | last post by:
Hi everyone, I am going to export content of Rich text into MS WORD (.doc file) in a window application. thanks. Sb. Luis.
3
by: Robert Bogue [MVP] | last post by:
I've got a test harness I've been building and playing with to manage ASP.NET web parts. One thing I've noticed is that I do not seem to be able to reimport the webparts I've exported back on to...
0
by: Ted H | last post by:
Hi, I got an error when I tried to build a template from MS Visual Studio 2005 / Export Template Wizard: "Unable to read an exported file for the following reason: The file cannot be opened with...
0
by: getpunith | last post by:
Hi all, How can export or insert an Image to MS WORD 2007. Doc.InlineShapes.AddPicture() needs an Image file stored on disk space, But I dont have Image file.What I have is an Image object. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.