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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

download ms access table to an excel file

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

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)?

View Complete Post

More Related Resource Links

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?

Import Access table or Excel spreadsheet into Oracle table


I am trying to import from an Excel spreadsheet or an Access database into an Oracle table.  I used the SSIS Import and Export wizard to create the SSIS packages, but everytime that I attempt to run the package, SSIS stops once it gets to the Pre-Execute phase.  There are never any errors.  Am I doing something that cannot be done?

I'm using the following:  SSIS 2005, Microsoft Oracle OLEDB provider (MSDAORA.1), Excel and Access 2003

By the way, I am able to successfully export from the Oracle database to either Excel or Access using SSIS.


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.
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 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.

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


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.

Insert Data to table from excel file


guys, i am new to sql development

my question is how do i import data from an excel table,

i was trying to do it via a query and just paste the values, but received a syntax error. thanks

data structure is:


How to automatically refresh pivot table in excel web access?



I have created UDF which takes parameters and returns data from the SQL back end. On the data returned to excel, i have created a pivot table and pivot chart. When i pass in the parameter from excel web acess, the data in the pivot table and chart dosent gets refreshed until i click on "Refresh All Connection" in excel web access webpart. Is it possible to refresh the pivot table automatically wheh i pass in the parameters from excel web access webpart?


upload excel file to sql table


i tired a lot of correction, in the end i end up fully used the completely same code and guide of this link.


that was a well step-by-step guide through.

the error i get was, i found out it didnt save the file into table.
from the table under the file column
it show

if i click on download the file
error code shown,
There is no row at position 0.

Source Error:
Line 111:        Dim bytes() As Byte = CType(dt.Rows(0)("file1"), Byte())

can anyone teach me? thanks..

How can I download an Excel file saved on the same server as an asp.Net website?



I able to successfully see all the Excel files in the given folder using the datagrid and code below. Now I would like to be able to click the link to the file, or add a button, to get a download file dialog box. Can someone please help me.



<asp:datagrid id="FileGrid" runat="server" 
    AutoGenerateColumns="False" AllowSorting="True">
        <asp:TemplateColumn HeaderText="File" >
                <asp:HyperLink id="systemLink" runat="server" 
                NavigateUrl='<%# DataBinder.Eval(Container, "DataItem") %>'
                Text='<%# DataBinder.Eval(Container, "DataItem") %>' />
        <asp:BoundColumn DataField="Length" HeaderText="File Size" />
        <asp:BoundColumn DataField="LastWriteTime" HeaderText="Last Modified" />


Imports System.IO

Partial Class pageclass

Table to new excel file destination



I have a table and I need to dump those columns into the new excel file...how can I ..?? 

Direct Link to a Sharepoint 2010 file from Access, Excel, etc


Hi...our organization is upgrading to sharepoint 2010 from an earlier version.  In the earlier version, it was very easy to link to a document in a sharepoint library, from MS Access or Excel.  But now, on 2010 version, simply linking to the URL of the document no longer works.  It's like the file does not really exist in the location noted if you grab a shortcut URL.

Does anyone have any idea how we can continue to link to sharepoint 2010 documents, so all of our nicely linked access and excel processes continue to work

Hopefully I am making sense?



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 :)


Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Import XML File to SQL Table

Here is a brief example of importing an XML file into SQL Server table. This is accomplished by using the BULK option of OPENROWSET to load the file, and then utilizing the XQuery capabilities of SQL Server to parse the XML to normalized table format. This example requires SQL server 2005 or SQL Server 2008.

First, the following XML is saved to XML file C:\Products.xml.

Convert excel file into xml


Hai, I have two columns with id,name in the excel sheet.I want to convert into xml file in the below format

<?xml version="1.0" encoding="utf-8"?>

<guide xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Boat id="1"> <name> Copper Kettle </name> </Boat> <Boat id="2"> <name> Copper Penny </name> </Boat> <Boat id="3"> <name> Copperhead </name> </Boat> <Boat id="4"> <name> Coppertone </name> </Boat> <Boat id="5"> <name> Copy Boy </name> </Boat> </guide>

suggest me with sample code in ASP.NET. Thanks


Read Excel file from Web Application (C#)



I have a web app where user uploads a file.

File is saved in server locally and I want to read some data from it.

Currently my development  server has office 2003.

So do I need office 2007 in order to be able to  read an excel from office 2007 ?

What are other requirements  ?

I tried a test, using

Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook wrkBook; // = new Microsoft.Office.Interop.Excel.Workbook();

wrkBook = excelApp.Workbooks.Open(@"C:\www\excel_files\b.xls", ....);

But When trying to open the file I get the error:

Exception from HRESULT: 0x800A03EC

So I'm wondering what I'm missing.


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