Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Open Excel OLE object embedded in MS Access

Posted on 2003-03-21
9
Medium Priority
?
649 Views
Last Modified: 2008-03-06
I have an Access database containing an Excel OLE object embedded.  I have no problem with other fields in the database except this OLE object.  Any idea how I can accomplish this?  Thanks.

WK
0
Comment
Question by:wkadviser
  • 4
  • 4
9 Comments
 
LVL 10

Expert Comment

by:apollois
ID: 8184649
Hi wkadviser,

If you're trying to open the Excel OLE object on the web server, this is not a good idea.  It requries that Excel be installed on the Web server.  Programs like Excel and Word are NOT designed to run in the environment of a web server.  Here's some info:

============================================================
All current versions of Microsoft Office were designed, tested, and configured to run as end-user products on a client workstation. They assume an interactive desktop and user profile, and do not provide the level of reentrancy or security that is necessary to meet the needs of server-side components that are designed to run unattended.

There are a number of complications that can occur if Automation is to take place from server-side code such as Active Server Pages (ASP), DCOM, or an NT Service.

Using the Excel or Word application from ASP is NOT recommended, and can lead to your Web server locking up and/or crashing.  There is almost always better or alternative approaches to satisfy your requirements.

"MICROSOFT DOES NOT CURRENTLY RECOMMEND, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, DCOM, and NT Services), because OFFICE MAY EXHIBIT UNSTABLE BEHAVIOR and/or deadlock when run in this environment."

REF: http://support.microsoft.com/default.aspx?scid=kb;en-us;257757
============================================================

If you will tell us what you are trying to accomplish with the Excel OLE object, perhaps we can suggest some alternatives.

Best Regards,
>apollois<
0
 
LVL 7

Expert Comment

by:chisholmd
ID: 8184650
Well first this might not be the correct forum.  Second need to be more specific then:

Any idea how I can accomplish this?

Accomplish what? What isn't working?
0
 

Author Comment

by:wkadviser
ID: 8185135
Hi apollois,

I have a client who has been embedding Excel charts with pictures in Access as OLE object.  All I need to do is somehow make this chart with pictures display on a webpage.  Unfortunately, it'll be a lot of work to switch the Excel data to Access and he's using these Excel files for other purposes as well.

WK
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 10

Expert Comment

by:apollois
ID: 8185158
wkadviser,

How about converting the Excel charts to .gif then save in Access.  I think Excel 2000 and later can convert to .gif natively.

Best Regards,
>apollois<
0
 

Author Comment

by:wkadviser
ID: 8185305
Hi apollois,

That would display but that means he'll have to convert for each Excel file which is very time consuming because of the large number of files.  Is there some way for ADO to grab these OLE objects in Access?  If not, how would I display these images stored in Access?

WK
0
 
LVL 10

Accepted Solution

by:
apollois earned 200 total points
ID: 8185338
wkadviser,

To display on a web page the image needs to be .jpg or .gif.  ADO can retrieve the Excel OLE image, but I doubt that you can display it on an HTML page without some type of conversion.

It would be easy enough to write an Access procedure to go through all records, open the Excel OLE image using Excel automation, convert to .gif, and then save in a new field.  This would all be done on your workstation, not on the web server.  When finished, the image can easily be displayed on a web page.

You could write a Excel macro for your client that converts the Excel chart to .gif, and then saves to Access.

One more thing.  Many people believe that its best to NOT save an image in the DB, but as a file, then put the path to the image in the DB.  In fact, if all the Excel OLE images were stored as files, there are graphic programs that will batch convert to .gif.

IAC, you will have to convert the Excel OLE image to gif BEFORE you put on the Web server.

Best Regards,
>apollois<
0
 

Author Comment

by:wkadviser
ID: 8185374
Thanks apollois.  But if I really do decide to use OLE image in Access method, how would I use ASP to do it?  I've seen examples on the web that does this with SQL Server but not with Access because of the different way in which they store images.

WK
0
 
LVL 10

Expert Comment

by:apollois
ID: 8185384
DISPLAYING IMAGES FROM DATABASE

How can I display images that reside in my database through an ASP page?
http://www.aspfaqs.com/ASPScripts/PrintFAQ.asp?FAQID=172

Displaying Images that Reside in a Database
http://www.4guysfromrolla.com/webtech/060100-1.shtml

HOWTO: Display an Image on a Web Page When the Path Is Stored in a Database
http://support.microsoft.com/default.aspx?scid=KB;en-us;q299320

HOWTO: Display Images Stored in a BLOB Field
http://support.microsoft.com/default.aspx?scid=KB;en-us;q173308

Store Images in Your Database
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbpj01/html/gs0102.asp

Storing Images in a DB - Pros and Cons
http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=10477
0
 

Author Comment

by:wkadviser
ID: 8185397
Those links are perfect!  I gotta do a better job searching for these stuff next time.  Thanks.

WK
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month11 days, 21 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question