473,326 Members | 2,126 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,326 software developers and data experts.

uploading excel file and extracting the image to a folder

1
Hi,

My 1st post ..

I'm writing an import routine to open a dynamically uploaded excel file, import the data into an MS SQL database, save an image which is always in the same location - named 'picture4', close the file and then delete it.

Text/numeric information I can manipulate no problem since I discovered I must 1st set a Named Range, however I cannot figure out how to access and extract the image and save it to the server.

I've been searching for a few days now to no avail. There's a wealth of information doing the reverse, but nothing on this topic.

If anyone has experience of doing this I'd be delighted to hear from you.

My current stripped down basic code is as follows:

Expand|Select|Wrap|Line Numbers
  1. <%
  2. strDriver = "Driver={Microsoft Excel Driver (*.xls)};" & _
  3. "DBQ=PATH_TOXL_FILE.xls;"  
  4. Set objConn = Server.CreateObject("ADODB.Connection")  
  5. objConn.Open strDriver  
  6.  
  7. strSELECT = "SELECT * from `spec_sheet`" 
  8. Set objRS = Server.CreateObject("ADODB.Recordset")  
  9. objRS.Open strSELECT, objConn 
  10.  
  11.     Response.Write "<table border=1 ><tr>"  
  12.  
  13.        For i = 0 to (objRS.Fields.Count - 1)  
  14.          Response.Write "<td><font face=&quot;MS Gothic&quot;><B>" & objRS(i).Name & "</B></font></td>"  
  15.        Next  
  16.  
  17.        While Not objRS.EOF 
  18.  
  19.          Response.Write "</tr><tr>"  
  20.  
  21.          For i = 0 to (objRS.Fields.Count - 1)      
  22.            %><td><font face="MS Gothic"><%'=objRS(i).Name%> : <%=objRS(i)%></font></td><%  
  23.          Next  
  24.  
  25.          objRS.MoveNext  
  26.  
  27.        Wend  
  28.  
  29.     Response.Write "</tr></table>" 
  30.  
  31. objRS.Close
  32. objConn.Close
  33. Set objRS = Nothing
  34. %>
  35.  
Many thanks in advance,
8hours
Oct 6 '06 #1
0 1598

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: RK | last post by:
Hi, In my application, I need to copy data from an Excel file into a SQL table. The article related to this can be found at http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B306572 ...
4
by: Ramakrishnan Nagarajan | last post by:
Hi, I am facing a different problem in my application. In that I am uploading a folder that contain only images. Everything was done and was working fine too. When I executed the application using...
0
by: Alex | last post by:
my app was working fine in VB.NET 2003 (and framework 1.1). Now with VB.NET 2005 (framework 2.0) the uploading to an http server (ie. www.sharebigfile.com) stops with the error "The request was...
6
by: rlntemp-gng | last post by:
I need to extract information from some Excel files but am stuck with part of it: As an example, I have the following Excel File that has 3 tabbed sheets: FileName: ...
44
by: badvoc | last post by:
Hi to all, Firstly I must state my knowledge of php is limited but I am a quick learner. I have taken on the task of finishing a friends website due to his untimely passing and have hit a problem...
0
by: upadhyayanuj | last post by:
Hi I have an error while uploading file and then importing it into my sql table The process cannot access the file 'c:\inetpub\wwwroot\FlowLine\Excel File\Fan_Details.xls' because it is being...
1
roswara
by: roswara | last post by:
Dear all, Currently, I am working on a project to make a web-based application using ASP 2.0 and C#. This application will ask user to input for an excel file which has graphs in it. Then the...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
2
by: matech | last post by:
I have a problem with uploading special characters from excel files to mysql 5. It doesn't matter if I use UTF-8 or iso-8859-1 when uploading the trademark ™ symbol. htmlspecialchars() or...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.