.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.

Posted By:      Posted Date: October 02, 2010    Points: 0   Category :ASP.Net
 

Hello everybody.

I am in a critical situation. I first tried to make a project (file->new->project) using visual studio, where I displayed the content of a excel file by GridView. I was successful then, but when I attach it to my website located in inetpub I am getting this error :

Microsoft Office Excel cannot access the file 'C:\inetpub\wwwroot\ProjectWebSite\Files\ROUTINE_MCA.xlsx'. There are several possible reasons:

. The file name or path does not exist.
. The file is being used by another program.
. The workbook you are trying to save has the same name as a currently open workbook.


At first I faced some COM related problem and found solution in Google, but this particular problem is not solving. Is there any way to access Excel document in asp.net website?

In my application there is a facility of uploading excel document to the server and then display its content. But I have failed to do this display operation, is there any turn around way, like store the excel document as dataset and then access it as required.

Please help. I am in great trouble. Thanks in advance.




View Complete Post


More Related Resource Links

Microsoft Office Excel cannot access the file.There are several possible reasons: . The file name or

  
Hi all,
I am workin on Arc IMS web application project where I will be uploading an excel file containing data say city,addresszip(column headers in excel file)..etc..and load necessary column data in listboxes..and finally save the data to an excel file..when I run though Studio I dont get error..when I run through browser..I got errors ..I even modified DCOMCNFG...But..I get the below error..
Microsoft Office Excel cannot access the file 'E:\vijay\ArcIms\Excelsheets'. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.
xml
Here goes my code..
Imports Excel
Imports System.Data.OleDb
Imports System.Data
Partial Class _Default
    Inherits System.Web.UI.Page
    Dim connection As New System.Data.OleDb.OleDbConnection
    Dim command As New System.Data.OleDb.OleDbCommand
    Dim dr As System.Data.OleDb.OleDbDataReader
    Dim cmd1 As New System.Data.Ol

Microsoft Office Excel cannot access the file

  

Hi All,

I'm having difficulty opening microsoft office files  in this case Excel on a Sharepoint 2007 site when using IE 6.  Here are the errors I get: 

Excel:  Microsoft Office Excel cannot access the file
'https://<var>server_name</var> SPSsite/documents/<var>file_name</var> .xls'. There are several possible reasons:
The file name or path does not exist.
The file being used by another program.
The workbook you are trying to save has the same name as a currently open workbook.

Here are some additional details:

OS = Vista
IE = Version 6

Please help me :)

thanks!


Microsoft Excel cannot access the file

  

I am trying to import an excel content to a SharePoint list. When I choose an excel file and import I am saving the file Using "Microsoft.Office.Interop.Excel" object to the temporary folder location and reading it from there. When I try opening a file using "Microsoft.Office.Interop.Excel.Application.Workbooks.Open" I am getting the following error.

Microsoft Excel cannot access the file "TEMP" folder. There are several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name as a currently open workbook.

I have tried impersonating the INTERACTIVE USER account. But this looks like the excel object doesn't have permission. Please share your inputs on this issue.


could not load file or assembly'Microsoft.office.interop.excel

  

could not load file or assembly'Microsoft.office.interop.excel, version=12.0.0.0  , culture=neutral, public keytoken=71e9bce111e9429c' or one of its dependencies

i am getting this error when i am installing setup of my project in other machine.

 


Microsoft Office Excel cannot open or save any more documents because there is not enough available

  

hi all,

     i am new to asp.net programming i am trying to create an ms excel file with charts drawn in it,

i wrote the complete code for it but the it is saying

Microsoft Office Excel cannot open or save any more documents because there is not enough available memory or disk space. 

i have set the permissions to my complete disk space and all user accounts, and i tried with anti-virus disabling also it didnt work please try to help me out and my code is :

Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Imports Microsoft.Office.Tools.Excel
Imports System

Anonymous access on Excel Viewer web part for a no access .xslx file?

  
I have a public facing SharePoint 2010 Enterprise website with anonymous access enabled. I'd like to present information (a pivot chart) from an .xslx file using the Excel Viewer Web Part. It works fine when I place the .xslx file in a document library that the anonymous users can access. I would, however, like to remove anonymous access from the .xslx file and only expose the chart from the .xslx file using the Excel Viewer web part. When I alter the library permissions to remove anonymous access to the library that holds the .xslx file, the Excel Viewer web part displays an "Access Denied" message to the anonymous user. Is there some other way to achieve this?

** Microsoft.Office.Interop.Excel.dll - Do I need Excel installed?? **

  
Hi,I have a VB.Net app which creates an Excel report.  This is all working fine on my development boxwhich turns out to have MS Office 2003 installed.  The app works fine.  I added a reference toMicrosoft Excel 11.0 Object Library under the COM tab when I did the "Add Reference".  I also copiedthe Interop.Excel.dll to my BIN folder.The server that I need to deploy my app to does not have MS Office or Excel installed.  I ran the appanyway just to see if it would worked.  Of course, it failed with this error:Retrieving the COM class factory for component with CLSID {00020820-0000-0000-C000-000000000046} failed due to the following error: 80040154.Do I need to have Excel installed on the target machine?  I took a copy of "Microsoft.Office.Interop.Excel.dll"from the GAC on the DEV box and installed on the GAC on the target machine.  Tried the app again and stillfailed with the same error.  I really don't want to install Excel if I don't have to.  Can someone please providesome help on this?Thank you in advance!

access to Microsoft.Office.Server.dll

  

I'm customizing a login page for forms auth and get an error. I even allowed the internet user read access to:
c$\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI

Microsoft.Office.Server.dll date: 8/24/2007

 

I have login.aspx page that has the code in a user control Login.ascx and Login.ascx.cs.


CODE:
using Microsoft.SharePoint;
using Microsoft.Office.Server;                       //errors here
using Microsoft.Office.Server.Administration;
using Microsoft.Office.Server.UserProfiles;

 


ERROR:
c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\myfiles\Login.ascx.cs(13): error CS0234: The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Bool

How to merge sheets from multiple excel files into one .xls file?

  

 I have several excel spreadsheet fils, each of them contains multiple work sheets that may storing images or data.

 How could I merge all of these work sheets to just one .xls file and keep their original layout and style using asp.net?

 Thanks in advance.


Could not load file or assembly 'Microsoft.Office.InfoPath.Vsta...

  

I was evaulating SharePoint Designer 2010 and InfoPath 2010 for my team so I installed both of them on my pc. But after I realize we won't have SharePoint Server 2010 for a while, I uninstalled those two applications.

Now the problem cames... when I try to publish a InfoPath 2007 form and it gave me that error message:

Could not load file or assembly 'Microsoft.Office.InfoPath.Vsta, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies.

Clearly, Visual Studio 2005 is trying to find the assembly from InfoPath 2010, but it's been uninstalled already. So how do I tell VS to use InfoPath 2007?

Another question, how to force InfoPath 2007 to create the C# code project with VS 2008? It's using VS 2005 by default.


Can't find Microsoft.Office.Interop.Excel.dll

  

 

I am trying to use this namespace and downloaded the O2003pia.exe from http://support.microsoft.com/kb/897646.

 

I ran the msi and see the Interop files in the GAC but when I try to 'Add a Reference' in VS2005, I do not see any of the Interop namespaces.

 

I already had Office 2003 installed before I ran the above msi.

 

What else am I doing wrong. Why aren't these included with VS2005 in the first place..............

 

Please help,

 

JJM


ASP.NET Excel Microsoft.Office.Interop.Excel.ApplicationClass

  

Hello,

My server is windows 2008 R2. Everything is running well except the following.

Whenever I tried to export to excel using:

Microsoft.Office.Interop.Excel.ApplicationClass app = new Microsoft.Office.Interop.Excel.ApplicationClass();

It shows exception:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005

I searched on google, almost every suggestion told me to find Microsoft Excel Application in DomConfig. But I found no Microsoft Excel in DomConfig. Please note, I have Excel 2003 & 2007 on that server.


Please help me, its really urgent.


When dynamically creating an excel file, can SSIS create xlsx files successfully? I can only get SSI

  

Problem: An Excel file (XLSX) dynamically created by a SQL Task cannot be opened via Excel. The task succeeds, but when you try to open the workbook in Excel you get the fillowing error message: Excel cannot open the file 'myfile.xlsx" because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

Observations:
1. If the Excel file (xlsx) is created manually in Excel, then the SQL Task has no problem creating table (new worksheets) in the xlsx (so the "CREATE TABLE" statement works fine)
2. If I adjust the connection and task to work with Excel 97-2003 (xls) format then the approach works perfectly
3. The execution results show success of the SQL Task, but there are two warning messages. These same warnings appear when the SQL Task creates a new table (worksheet) successfully in a workbook (xlsx) which was created manually in Excel (and is not corrupt). Messages as follows:
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Warning: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

SSIS Details:
1. ConnectionString: "Data Sour

Microsoft.Office.Interop.Excel NumberFormmatting Help

  

Hi Everyone. I wasn't sure which forum to put this under, so please move if necessary.

 

I have an app that exports a data table to excel. This works, however, i have a column with currency that i can't get formatted properly.

 

IE: Right now it prints 24450.00 or 24000 if a whole number with no decimal places.

 

I have tried a lot of things, but this is what i have right now for my range and formatting. Below is a copy of the method. Please let me know where i am going wrong, because with this range and formatting, SOME of the numbers are showing up #######.

 

Below is my formatting code. What am i missing? It seems like it formats some based on the "$#,##0.00", but it doesn't work for them all.

How do i set everything to "Currency" like in the excel options? I have tried range.NumberFormat = "Currency" but that is invalid. Any help is appreciated.

 Microsoft.Office.Interop.Excel._Application excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
      Microsoft.Office.Interop.Excel.Workbook wb = (Microsoft.Office.Interop.Excel.Workbook)excel.Workbooks.Add(System.Reflection.Missing.Value);
      Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.In

download ms access table to an excel file

  

Is there a way to give users the capability to download an on-line table produced via gridview to an excel file (other than by copy/paste)?


Migrate/Upgrade from Office 2003 (Excel, Access...etc) to Office 2010

  

Hello,

We are about to begin a project to upgrade our MS-Office suite from 2003 to Office 2010.  This will include the migration of a large number of excelwork books with macros and access database and forms,   Is there an established (or tried and true) process for conducting the analysis work to determine if the excelwork books require individual attention (evaluation, conversion and testing) or can be converted in bulk?

Are there any know issues?  

Our company have a strong support relation with microsoft, Does any one know the perfect person who did similar kind of work or can help to do this?

Thanks, Vijay

 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend