Experts Round Table Network
Navigate
Home
ArticleWiki
Forum
Journal
Search
Newsletter
Links
Tech News
expertsrt.com
Welcome Guest.
Username:
Password:
Remember me
Forgot your password?
Register
Upload Excel file and write cell values to table
Welcome,
Guest
. Please
login
or
register
.
December 01, 2008, 06:20:36 PM
11304
Posts in
1248
Topics by
496
Members
Latest Member:
teentiodo
Home
Help
Search
Login
Register
Experts Round Table Network
|
Serverside Technology
|
ASP
|
Upload Excel file and write cell values to table
« previous
next »
Pages:
[
1
]
Print
Author
Topic: Upload Excel file and write cell values to table (Read 1248 times)
sajuks
Site Builder
Offline
Posts: 18
Upload Excel file and write cell values to table
«
on:
August 31, 2006, 09:01:20 PM »
This is similar to the one which i have posted in the PHP area.
Hi All,
We are looking for an upload script which will upload an excel file and then insert the contents of the cell to a table in the database.
We are using ASP with SQL Server.
The excel file contains the data in Sheet1.
The excel sheet contains headers.
Sample Output would be
Description From Date To Date
Test A 12/2/2006 14/2/2006
Test B 2/2/2006 14/2/2006
Test C 1/12/2006 14/2/2006
Test AB 25/9/2005 4/12/2005
Test AC 6/9/2005 1/2/2006
The SQL Server table structure is
id identity
desc varchar
fdate datetime
tdate datetime
uploaddate datetime
The script should allow the user to browse to the file and then clicking on upload/save should insert the
values to the said table.
How do i code for such a scenario.
Tnx
Logged
amit_g
Offline
Posts: 2
Re: Upload Excel file and write cell values to table
«
Reply #1 on:
September 16, 2006, 02:51:20 AM »
Do you still need help with this?
Logged
sajuks
Site Builder
Offline
Posts: 18
Re: Upload Excel file and write cell values to table
«
Reply #2 on:
September 16, 2006, 08:47:48 AM »
We had to look for other alternatives as we wanted this on an urgent basis. Now we would be happy to know how to proceed with it for our understanding and reference and more possibly future use.
Logged
VGR
Mentor
Offline
Posts: 682
Re: Upload Excel file and write cell values to table
«
Reply #3 on:
September 16, 2006, 09:52:16 AM »
well, as far as you problem stands, neither PHP, ASP, JSP oe the like will express any difference. The problem lies in the platform (open or not), protocol, proprietary stuff or not (COM not to name it), and your ability of making the process easier by "formatting" the input data (XLS vs CSV)
Logged
techie overlord, answers all kind of questions on
http://www.europeanexperts.org
amit_g
Offline
Posts: 2
Re: Upload Excel file and write cell values to table
«
Reply #4 on:
September 18, 2006, 01:50:40 PM »
Just looked at your same question in PHP and the first comment is the solution in ASP also except that in ASP, we can directly open the Excel as a database. So it is 2 step process. First upload the file to the server which is quite simple and then opening that Excel as database. The only requirement is that the Excel file MUST be in exact same format and the sheet MUST have a fixed name (it could be default but it has to be same). The connection string to be used for connection is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\UploadFolder\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
Logged
Pages:
[
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
ERT 1.5
-----------------------------
=> Round Table Learning Center
=> Bug reports
-----------------------------
Legacy
-----------------------------
=> The next level
=> History of ERT
-----------------------------
Community Affairs
-----------------------------
=> Introductions
=> Ballot Box
===> Closed Polls
=> Soapbox
=> Propose and Consult
===> Propose and Consult...CLOSED
-----------------------------
Bits and Bytes
-----------------------------
=> Tips, Tricks, Snippets, Tidbits And General Pearls Of Wisdom
-----------------------------
Serverside Technology
-----------------------------
=> PHP
=> ASP
-----------------------------
Webservers
-----------------------------
=> Apache
=> IIS
-----------------------------
Databases
-----------------------------
=> MySQL
=> Access
=> MS SQL Server
-----------------------------
Clientside Technology
-----------------------------
=> HTML
=> CSS
=> Javascript
=> Flash
=> WAP/WML
-----------------------------
Web Technologies
-----------------------------
=> General Web Dev
=> Web Standards
=> XML
=> Online Marketing
-----------------------------
Graphics
-----------------------------
=> Graphics Design and Animation
-----------------------------
Programming
-----------------------------
=> .NET
=> JAVA
=> MS DOS Batch Scripting
=> Mathematics
=> C & C++
=> VB
=> Delphi
=> Algorithm design
-----------------------------
Operating Systems
-----------------------------
=> Windows (General)
=> NT Based (2K, 2K-03, NT, XP, Vista)
=> Open Source (All)
-----------------------------
Hardware
-----------------------------
=> Hardware General
=> Gamers Hardware (Advanced)
-----------------------------
Networking
-----------------------------
=> Home (small)
=> Office (large)
=> Internet
-----------------------------
Security
-----------------------------
=> General Security Issues
-----------------------------
Rants/Opinions/Proposals
-----------------------------
=> Site operation
Powered by SMF 1.1 RC2
|
SMF © 2001-2005, Lewis Media
Joomla Bridge by
JoomlaHacks.com