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
- <%
- strDriver = "Driver={Microsoft Excel Driver (*.xls)};" & _
- "DBQ=PATH_TOXL_FILE.xls;"
- Set objConn = Server.CreateObject("ADODB.Connection")
- objConn.Open strDriver
- strSELECT = "SELECT * from `spec_sheet`"
- Set objRS = Server.CreateObject("ADODB.Recordset")
- objRS.Open strSELECT, objConn
- Response.Write "<table border=1 ><tr>"
- For i = 0 to (objRS.Fields.Count - 1)
- Response.Write "<td><font face="MS Gothic"><B>" & objRS(i).Name & "</B></font></td>"
- Next
- While Not objRS.EOF
- Response.Write "</tr><tr>"
- For i = 0 to (objRS.Fields.Count - 1)
- %><td><font face="MS Gothic"><%'=objRS(i).Name%> : <%=objRS(i)%></font></td><%
- Next
- objRS.MoveNext
- Wend
- Response.Write "</tr></table>"
- objRS.Close
- objConn.Close
- Set objRS = Nothing
- %>
8hours