473,796 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

uploading excel file and extracting the image to a folder

1 New Member
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 1615

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

Similar topics

4
11313
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 Using this,I am first extracting data from given excel file into a temporary DataTable. After making some operations on that DataTable (like splitting one column into two), I am saving the data into actual
4
1653
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 the localhost it works fine. But when my machine acts as a client and executes the application from another machine (considered as the server) it is telling that the folder is not found, even if the folder is present in the client machine. The...
0
7282
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 aborted: The request was canceled" after about 7 MB. For example, I might be uploading a 73MB file. After about 11% done the upload aborts. :shake: It works great for files < 5MB. I can upload those every time.
6
4930
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: C:\ExcelData\JulyFile1.xls SheetName: Sheet1-07032007 RowCount: 325 ColumnCount: 15 SheetName: Sheet2-07102007 RowCount: 450 ColumnCount: 25 SheetName: Sheet3-07172007 RowCount: 625 ColumnCount: 45 (I have 7 other Excel files with similar attributes)
44
9579
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 with the completion of his work. The site involves the uploading of a picture, jpg, png or gif. as part of an order process. The files involved are called order.php, step1.php and then step2.php. The picture uploads to the upload folder,...
0
1628
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 used by another process Now Some times its run successfully, i don't no how but somtimes it gives error, I figure out there is security issue of the folder where its storing the file, But i had given all right to user there
1
2113
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 application will grab the graph as image file, and this image will be displayed as thumbnail in the page. Is it possible to accomplish this feature? If it is possible, would you please tell me how? And if it is not possible, why?
6
8071
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 to change the Content- Type and Content-Disposition headers, and essentially print the same report, and it's done. That works fine. But in some reports on the web I need to show images. The web part is fine, but I'm having a tough time...
2
3588
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 htmletities() doesn't help? the database doesn't show the data in the field but replaces it with the binary/Image information. the following are examples of how I've tried loading the data along with UTF-8 or iso-8859-1:
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10467
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10244
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10201
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.