473,569 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Excel template

I have a website that has an Excel template. The template contains 3
QueryTables. The template is located on the web server. I would like to
refresh the data prior to the user opening the template from the website.
This is the code:

wb = excelApp.Workbo oks.Add(FilePat h)
wb.RefreshAll()
wb.Save()
excelApp.Quit()
.... User opens template

The problem is that the user is prompted for a UserName and Password. It
must be a permission issue because when I run from development in debug, I
do not get a prompt.

How do I get around this? I have given everything but full control on the
folder to the ASPNET account and anything else that look like ASP--I still
get the message.

Thanks in advance.
Karen
Nov 18 '05 #1
3 1758
Hi Karen:

Does the web service require authentication? If you browse to the web
service with Internet Explorer does it prompt you? If the web service
is written in .NET, check in the web.config file to see how the
authentication and authorization sections are set.

--
Scott
http://www.OdeToCode.com

On Sun, 26 Sep 2004 10:27:08 -0700, "Karen A Hodge"
<ms*****@pacbel l.net> wrote:
I have a website that has an Excel template. The template contains 3
QueryTables. The template is located on the web server. I would like to
refresh the data prior to the user opening the template from the website.
This is the code:

wb = excelApp.Workbo oks.Add(FilePat h)
wb.RefreshAll( )
wb.Save()
excelApp.Quit( )
... User opens template

The problem is that the user is prompted for a UserName and Password. It
must be a permission issue because when I run from development in debug, I
do not get a prompt.

How do I get around this? I have given everything but full control on the
folder to the ASPNET account and anything else that look like ASP--I still
get the message.

Thanks in advance.
Karen


Nov 18 '05 #2
I use Forms Authentication. Here is a sample

<!-- AUTHENTICATION
This section sets the authentication policies of the application.
Possible modes are "Windows",
"Forms", "Passport" and "None"
-->
<authenticati on mode="Forms">
<forms name=".ASPXAUTH " loginUrl="Defau lt.aspx" protection="All " path="/"
timeout="30">
<credentials passwordFormat= "Clear">
<user name="Leadershi pApplicant" password="d1913 st"/>
</credentials>
</forms>
</authentication>
<!-- AUTHORIZATION
This section sets the authorization policies of the application.
You can allow or deny access
to application resources by user or role. Wildcards: "*" mean
everyone, "?" means anonymous
(unauthenticate d) users.
-->
<authorizatio n>
<deny users="?"/> <!-- deny unauthenticated Users -->

<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<identity impersonate="tr ue"/>
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:cj******** *************** *********@4ax.c om...
Hi Karen:

Does the web service require authentication? If you browse to the web
service with Internet Explorer does it prompt you? If the web service
is written in .NET, check in the web.config file to see how the
authentication and authorization sections are set.

--
Scott
http://www.OdeToCode.com

On Sun, 26 Sep 2004 10:27:08 -0700, "Karen A Hodge"
<ms*****@pacbel l.net> wrote:
I have a website that has an Excel template. The template contains 3
QueryTables. The template is located on the web server. I would like to
refresh the data prior to the user opening the template from the website.
This is the code:

wb = excelApp.Workbo oks.Add(FilePat h)
wb.RefreshAll( )
wb.Save()
excelApp.Quit( )
... User opens template

The problem is that the user is prompted for a UserName and Password. It
must be a permission issue because when I run from development in debug, Ido not get a prompt.

How do I get around this? I have given everything but full control on the
folder to the ASPNET account and anything else that look like ASP--I stillget the message.

Thanks in advance.
Karen

Nov 18 '05 #3
Hi Karen:

It looks as if the webservice requires authentication. In this case
changing security settings on the server will not help (unless you
change the web.config authentication mode).

You'll have to find a way to pass those credentials along with the web
service request from Excel. Do you know if you are using the SOAP
toolkit, or did you write an Office add-in with Visual Studio .NET?

--
Scott
http://www.OdeToCode.com

On Mon, 27 Sep 2004 09:35:07 -0700, "Karen Hodge"
<ms*****@pacbel l.net> wrote:
I use Forms Authentication. Here is a sample

<!-- AUTHENTICATION
This section sets the authentication policies of the application.
Possible modes are "Windows",
"Forms", "Passport" and "None"
-->
<authenticati on mode="Forms">
<forms name=".ASPXAUTH " loginUrl="Defau lt.aspx" protection="All " path="/"
timeout="30" >
<credentials passwordFormat= "Clear">
<user name="Leadershi pApplicant" password="d1913 st"/>
</credentials>
</forms>
</authentication>
<!-- AUTHORIZATION
This section sets the authorization policies of the application.
You can allow or deny access
to application resources by user or role. Wildcards: "*" mean
everyone, "?" means anonymous
(unauthenticate d) users.
-->
<authorizatio n>
<deny users="?"/> <!-- deny unauthenticated Users -->

<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<identity impersonate="tr ue"/>
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:cj******* *************** **********@4ax. com...
Hi Karen:

Does the web service require authentication? If you browse to the web
service with Internet Explorer does it prompt you? If the web service
is written in .NET, check in the web.config file to see how the
authentication and authorization sections are set.

--
Scott
http://www.OdeToCode.com

On Sun, 26 Sep 2004 10:27:08 -0700, "Karen A Hodge"
<ms*****@pacbel l.net> wrote:
>I have a website that has an Excel template. The template contains 3
>QueryTables. The template is located on the web server. I would like to
>refresh the data prior to the user opening the template from the website.
>This is the code:
>
>wb = excelApp.Workbo oks.Add(FilePat h)
>wb.RefreshAll( )
>wb.Save()
>excelApp.Quit( )
>... User opens template
>
>The problem is that the user is prompted for a UserName and Password. It
>must be a permission issue because when I run from development in debug,I >do not get a prompt.
>
>How do I get around this? I have given everything but full control on the
>folder to the ASPNET account and anything else that look like ASP--Istill >get the message.
>
>Thanks in advance.
>Karen
>


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3344
by: Axial | last post by:
Question: How to select columns from Excel-generated XML when some cells are empty. I've found examples where rows are to be selected, but I can't seem to extrapolate from that to selecting columns when some cells are empty. Is there a way to use the ss:Index to account for the missing <Cell elements? Thank you for any suggestions. ...
0
1402
by: Sathya | last post by:
Hi Am using an ASP.NET website. i have an excel template stored in a folder in the server. the excel template already has some data inside. i need to add some more data to the excel sheet based on the user accesing the website and open the excel to the user. User down load the form to their machine.
4
2896
by: Prasad Dannani | last post by:
Hi, We have to export our data in sql server table to any excel sheet. We have a template to export, using oledb we are inserting rows to this template and generating the excel output. The problem here is we are getting a single quote extra in front of each cell. can anyone help us in clearing this kind of an issue. we tried sending...
3
1806
by: sandeshmeda | last post by:
I have a XML file that is basically a Excel file saved as XML. I need to be able to change the XML into a different format. I was thinking one approach would be to: 1. Populate the dataset based on the XML file I get from excel 2. Use a WriteXML to create a XML file in the format I need. Will this work? How do I get started on this? Are...
2
4224
by: Brent Bortnick | last post by:
Hello, Is it possible to send data from ASP and put it into a existing template? i don't want to create an excel document I only want to send one piece of information from ASP to the Exisiting Template. Background: We have created a online quote number genetrator for our sales team and we want it to open the excel quote template and put...
3
3277
by: RJN | last post by:
Hi I've a template excel file which has all the calculations defined. There are certain input values to be entered which gives a lot of output to the user. I don't want to expose the excel sheet to the user as calculations become visible. I'm writing a web interface which takes the input values from user, updates the excel sheet and returns...
2
8904
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages BuildVersion="1,5,0815,0 " CountryName="Afghanistan" > <Language locale="English">
11
10048
by: mac6777 | last post by:
I am having a problem with the CopyFromRecordset function in VBA Access. I am attempting to run VBA in an Access Database that copies query results into an Excel spreadsheet. The VBA opens an Excel template, runs the query, then attempts to copy the query as a recordset into the Excel spreadsheet. The problem is that I get the following error...
13
2974
by: Peter | last post by:
VS2008 ans ASP.NET 3.5, Office 2003 What is the best way to run Excel Template from ASP.NET web page were the Excel is only installed on the client without any ActiveX? If so can someone point me to an example? Do not have Sharepoint. This is for Intranet and security is not important. Thank You
0
7697
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...
0
7612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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. ...
1
7672
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...
0
7968
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5512
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...
0
3653
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...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.