?
Solved

Error while creating Excel application in ASP

Posted on 2003-02-25
10
Medium Priority
?
444 Views
Last Modified: 2010-05-18
I get the following error at this perticular line

set e=server.CreateObject("Excel.Application")

error message

Error Type:
Server object, ASP 0177 (0x80080005)
Server execution failed

Is there any file or dll or library to be registered to create an excel application?
Or is there any requirement which is missing on the server?



0
Comment
Question by:froggy77
[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
  • 2
  • 2
  • 2
  • +2
10 Comments
 
LVL 2

Expert Comment

by:rwdunning
ID: 8018127
try this bit of code



<%@ Language=VBScript %>
<%
   'Change HTML header to specify Excel's MIME content type
   Response.Buffer = TRUE
   Response.ContentType = "application/vnd.ms-excel"
%>
0
 
LVL 4

Expert Comment

by:farzinm
ID: 8018159
It could be a permission issue
You can try this
1) Run DCOMCNFG.EXE

2) In the Application tab select Microsoft Excel Application and then click
the Properties button to configure the application.

3) In the Properties dialog you can configure your permissions for the
Microsoft Excel Application via the Security tab.
0
 

Author Comment

by:froggy77
ID: 8019075
I cannot use

<%@ Language=VBScript %>
<%
  'Change HTML header to specify Excel's MIME content type
  Response.Buffer = TRUE
  Response.ContentType = "application/vnd.ms-excel"
%>

because at the end of the asp page I have to save the excel file and I cannot do it using the above code.

And regarding DCOMCNFG.EXE
I changed the permission but it still gives the error message. Should I reboot the system after changing the security options?
0
WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

 
LVL 4

Expert Comment

by:farzinm
ID: 8019130
yes u can try that. If it is a permission issue it should be solved this way
0
 
LVL 2

Expert Comment

by:rwdunning
ID: 8019148
If you're using Excel 2002 you can use this object instead.
Hope it helps. I can provide more info on how to populate the fields if needed.

<object classid="clsid:0002E551-0000-0000-C000-000000000046" id="Spreadsheet1">
  <param name="DataType" value="XMLDATA">
  <param name="AllowPropertyToolbox" value="-1">
  <param name="AutoFit" value="0">
  <param name="Calculation" value="-4105">
  <param name="Caption" value="Microsoft Office Spreadsheet">
  <param name="DisplayColumnHeadings" value="-1">
  <param name="DisplayGridlines" value="-1">
  <param name="DisplayHorizontalScrollBar" value="-1">
  <param name="DisplayOfficeLogo" value="-1">
  <param name="DisplayPropertyToolbox" value="0">
  <param name="DisplayRowHeadings" value="-1">
  <param name="DisplayTitleBar" value="0">
  <param name="DisplayToolbar" value="-1">
  <param name="DisplayVerticalScrollBar" value="-1">
  <param name="DisplayWorkbookTabs" value="-1">
  <param name="EnableEvents" value="-1">
  <param name="MaxHeight" value="80%">
  <param name="MaxWidth" value="80%">
  <param name="MoveAfterReturn" value="-1">
  <param name="MoveAfterReturnDirection" value="-4121">
  <param name="RightToLeft" value="0">
  <param name="ScreenUpdating" value="-1">
  <param name="EnableUndo" value="-1">
    <param name="XMLData" value="&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;ss:Workbook xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot;
 xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot;
 xmlns:c=&quot;urn:schemas-microsoft-com:office:component:spreadsheet&quot;&gt;
 &lt;x:ExcelWorkbook&gt;
  &lt;x:ProtectStructure&gt;False&lt;/x:ProtectStructure&gt;
  &lt;x:ActiveSheet&gt;0&lt;/x:ActiveSheet&gt;
 &lt;/x:ExcelWorkbook&gt;
 &lt;ss:Styles&gt;
  &lt;ss:Style ss:ID=&quot;Default&quot;&gt;
   &lt;ss:Alignment ss:Horizontal=&quot;Automatic&quot; ss:Rotate=&quot;0.0&quot; ss:Vertical=&quot;Bottom&quot;
    ss:ReadingOrder=&quot;Context&quot;/&gt;
   &lt;ss:Borders&gt;
   &lt;/ss:Borders&gt;
   &lt;ss:Font ss:FontName=&quot;Arial&quot; ss:Size=&quot;10&quot; ss:Color=&quot;Automatic&quot; ss:Bold=&quot;0&quot;
    ss:Italic=&quot;0&quot; ss:Underline=&quot;None&quot;/&gt;
   &lt;ss:Interior ss:Color=&quot;Automatic&quot; ss:Pattern=&quot;None&quot;/&gt;
   &lt;ss:NumberFormat ss:Format=&quot;General&quot;/&gt;
   &lt;ss:Protection ss:Protected=&quot;1&quot;/&gt;
  &lt;/ss:Style&gt;
 &lt;/ss:Styles&gt;
 &lt;c:ComponentOptions&gt;
  &lt;c:Label&gt;
   &lt;c:Caption&gt;Microsoft Office Spreadsheet&lt;/c:Caption&gt;
  &lt;/c:Label&gt;
  &lt;c:MaxHeight&gt;80%&lt;/c:MaxHeight&gt;
  &lt;c:MaxWidth&gt;80%&lt;/c:MaxWidth&gt;
  &lt;c:NextSheetNumber&gt;4&lt;/c:NextSheetNumber&gt;
 &lt;/c:ComponentOptions&gt;
 &lt;x:WorkbookOptions&gt;
  &lt;c:OWCVersion&gt;10.0.0.2621         &lt;/c:OWCVersion&gt;
  &lt;x:Height&gt;7620&lt;/x:Height&gt;
  &lt;x:Width&gt;15240&lt;/x:Width&gt;
 &lt;/x:WorkbookOptions&gt;
 &lt;ss:Worksheet ss:Name=&quot;Sheet1&quot;&gt;
  &lt;x:WorksheetOptions&gt;
   &lt;x:Selected/&gt;
   &lt;x:ViewableRange&gt;R1:R262144&lt;/x:ViewableRange&gt;
   &lt;x:Selection&gt;R1C1&lt;/x:Selection&gt;
   &lt;x:TopRowVisible&gt;0&lt;/x:TopRowVisible&gt;
   &lt;x:LeftColumnVisible&gt;0&lt;/x:LeftColumnVisible&gt;
   &lt;x:ProtectContents&gt;False&lt;/x:ProtectContents&gt;
  &lt;/x:WorksheetOptions&gt;
  &lt;c:WorksheetOptions&gt;
  &lt;/c:WorksheetOptions&gt;
 &lt;/ss:Worksheet&gt;
 &lt;ss:Worksheet ss:Name=&quot;Sheet2&quot;&gt;
  &lt;x:WorksheetOptions&gt;
   &lt;x:ViewableRange&gt;R1:R262144&lt;/x:ViewableRange&gt;
   &lt;x:Selection&gt;R1C1&lt;/x:Selection&gt;
   &lt;x:TopRowVisible&gt;0&lt;/x:TopRowVisible&gt;
   &lt;x:LeftColumnVisible&gt;0&lt;/x:LeftColumnVisible&gt;
   &lt;x:ProtectContents&gt;False&lt;/x:ProtectContents&gt;
  &lt;/x:WorksheetOptions&gt;
  &lt;c:WorksheetOptions&gt;
  &lt;/c:WorksheetOptions&gt;
 &lt;/ss:Worksheet&gt;
 &lt;ss:Worksheet ss:Name=&quot;Sheet3&quot;&gt;
  &lt;x:WorksheetOptions&gt;
   &lt;x:ViewableRange&gt;R1:R262144&lt;/x:ViewableRange&gt;
   &lt;x:Selection&gt;R1C1&lt;/x:Selection&gt;
   &lt;x:TopRowVisible&gt;0&lt;/x:TopRowVisible&gt;
   &lt;x:LeftColumnVisible&gt;0&lt;/x:LeftColumnVisible&gt;
   &lt;x:ProtectContents&gt;False&lt;/x:ProtectContents&gt;
  &lt;/x:WorksheetOptions&gt;
  &lt;c:WorksheetOptions&gt;
  &lt;/c:WorksheetOptions&gt;
 &lt;/ss:Worksheet&gt;
&lt;/ss:Workbook&gt;
">

 
0
 

Expert Comment

by:Henpatel
ID: 8025460
Do you have to display the page in Regular web format and then save the same page as excel
or you want to create an excel file along with some other things on the page and open it on click of button!!
Explain how do u want it!!
0
 

Accepted Solution

by:
froggy77 earned 0 total points
ID: 8025545
I create the excel file in the asp page, populate data from the database and I save it using the following command

wb.saved=true
wb.savecopyas newfile

and in the last line fo the asp page I redeirect to that file

Response.Redirect newfile

So finally what happens is when I click a button it creates the excel file , saves a copy and opens the excel file in xls format.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9115187
This question has been classified abandoned. I will make a recommendation to the
moderators on its resolution in a week or two. I appreciate any comments
that would help me to make a recommendation.

<note>
Unless it is clear to me that the question has been answered I will recommend delete.  It is possible that a Grade less than A will be given if no expert makes a case for an A grade. It is assumed that any participant not responding to this request is no longer interested in its final disposition.
</note>

If the user does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp


Cd&

0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 9306156
It is time to clean this abandoned question up.

I am putting it on a clean up list for CS.

<recommendation>
PAQ

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&

0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

777 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