?
Solved

Open Excel OLE object embedded in MS Access

Posted on 2003-03-21
9
Medium Priority
?
643 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

801 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