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

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

Working with excel in asp.net

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

I am uploading an excel file ( containing int values )using the fileupload control. I need to work on one entire column in the excel sheet.

I want to copy contents of the file either in an array or a table and then work on it.

Can anybody suggest a better way of working on the excel since .


View Complete Post

More Related Resource Links

In sharepoint excel working fine in office 2007 but not in office 2010


Hi All,

we receive error  while trying to create excel sheet using the template we have uploaded on the SharePoint 2007.


This occurs on a machine that has Office 2010 installed. Earlier the machine had Office 2007 and everything was working fine.


Can you let me know why is problem is coming and how to resolve this.



Sanjeev Tiwari


Working with Excel

Hi all,    I'm working in VS2005 and my task is following,   1. Need to open Excel file   2. Then call a macro function of the Excel   3. Close the Excel filefor this i'm using Microsoft.Office.Interop.Excel.ApplicationInstead of Interop what else i can use to do this Excel operation?Thanks!

Target audiences not working in excel services web part

My appologies i posted this originally in the pre-2010 forum So i'm reposting here: We have recently upgraded to Sharepoint 2010 and we're experiencing problems with the "target audience" field being available to the users. I am not the CA admin though so it'll make this a bit tough to get solved if the problem is there. What i'm looking for are the suggestions of things for me to forward to the CA admin to change or check if anything. We have a seperate Virtual Machine that is running 2010 that has this option available to users on that farm for some reason. however on our corporate farm we don't have that option available. Plus on top of this the quick launch items are not working with audiences as well to turn off the headers to links that have nothing in them due to security trimming on document libraries. I'm hoping that this being a more of an overview of things to check would help others who may have this problem as well. I've seen resolutions such as rebooting the server and such, however that's a bit lower level and we need some higher level things to check that may resolve the issue. Think the simple stuff first to check and lets work down the list. Doesn't matter how stupid it is but can we get a more compiled list of things to check to make sure that target audience visibility to users is enabled? Thanks!

Named Set working in excel but not in Browser....



I have a problem in the named sets.

I have a dimension with 6 levels and I have to calculate the standard deviation for each level, only for the siblings. I used Siblings to calculate the stdevp but it was not working with the filter, So i had to use named sets.

The problem is, this calculation is working fine in the Excel, even with the filter, but in the SSAS browser, filter is not working. Could anyone please suggest me the solution for this, or to calculate stdevp for siblings with some other way, that should work for the filters also(Filter here should be on the same dimension for which the stdevp is being calculated)?.

here are my calculations:

Named Sets:


[LEVEL2] : [DIM_A].[A].[LEVEL2].

Fact Dimension not working in Excel




I have ItemSales fact table. I have fact dimension Item Sale Transaction Information. Key is EntryNo, it also has attributes DocumentDate, DocumentNo, Description.


The problem is, that while this dimension works fine in browser, it's not possible to add it to excel. Whenever I try to drag and drop it to rows or columns, it tries to execute query, but then it disappears again. If I try to check the checkbox next to it, it shortly appears checked, but then disappears again. Oh, and this only happens for EntryNo, that is Key attribute. Adding any other attribute works as expected.

Strange thing is, I have another measure group with similar dimension, and it works fine there.

I've even tried recreating the dimension..

Working with opendatasource with excel 2007, csv files



I am using the below query to create an adhoc connection with excel 2003 and it works but when I use this with excel 2007 or CSV changing the adapter does not work could you please help.

Excel 2003 query:

INTO #temp
OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0','Data Source=\\networkdrive\networkfolder\Excel File.xls;Extended Properties=EXCEL 5.0')...[Sheet1$]

CSV file query which does not work:

An error occurred while preparing the query "select * from CSV File.xlsx.csv" for execution against OLE DB provider "MSDASQL" for linked server "(null)".

SELECT * FROM OPENROWSET('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=\\networkdrive\networkfolder;Extended properties=''ColNameHeader=True;Format=CSVDelimited;''','select * from CSV File.xlsx.csv')

And need the Excel 2007 query:


Working with SharePoint document libraries

Document libraries are collections of files that you can share with team members on a Web based on Microsoft Windows SharePoint Services. For example, you can create a library of common documents for a project, and team members can use their Web browsers to find the files, read them, and make comments. Users with Microsoft Office 2003 can check out and edit the files as if they resided on a local or network drive.

By default, your team Web site comes with a built-in document library named Shared Documents, which is listed on the Quick Launch bar as well as on the Documents and Lists page.

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.

Excel Automation in .Net

Excel Automation is a buzz word in both webapps and winapps. In the programming life (like Mr.Anderson neo) I guess almost every one could have come across this word. For others let me go further in detail. Excel Automation is automating some or all of the process involved in creating or updating excel worsheets.

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

Export SharePoint List to Excel Spreadsheet Programmatically using C#

In SharePoint applications, Custom Lists are used to store business data and Document Libraries to store the documents. But for data manupulation and analysis, Microsoft Excel provides very rich features as compared to SharePoint Lists. That's why people still loves to work on Microsoft Excel Sheets.

Creating an Excel Spreadsheet programmatically using VB.NET

The Interoperability services make it very easy to work with COM Capable Applications such as Word and Excel. This article reveals using Excel from a managed application. Excel is the spreadsheet component of Microsoft Office 2000. The majority of Excel programmatic functionality is exposed through Automation via the type library Excel9.olb. The intention of this article is to express that a managed application can interrelate with Excel as a COM server.

Create And Run Excel Macro At Runtime in C#

You've been tasked with writing a Windows Form application using the .NET Framework that interacts with Microsoft Excel. If you are new to working with Excel in .NET and are having trouble learning how to format certain cells or cell ranges, then this little tip will come in handy. Rather than scour the internet hoping to find the correct set of constants or method syntax for formatting your spreadsheet, use the built in tools in Excel to write the familiar VBA code for you. Then, you can paste the VBA code generated by Excel into the sample C# code below and run it dynamically at runtime.

Creating an Excel Spreadsheet and Adding Data to It Programmatically

The Interoperability services make it veryeasy to work with COM Capable Applications such as Word and Excel. Thisarticle reveals using Excel from a managed application. Excel is thespreadsheet component of Microsoft Office 2000. The majority of Excelprogrammatic functionality is exposed through Automation via the typelibrary Excel9.olb. The intention of this article is to express that amanaged application can interrelate with Excel as a COM server.

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

Working with DropDownList and ListBox Controls in ASP.NET

"In my application i am using dropdownlist to display all categories from a table. When the user clicks this control I display all records in that category. Category table also contains column called color.

I wanted display some categories in dropdown list different color and others in different color using ASP.NET."-Anonymous

Gridview that exports selected rows to Excel

his seems like a messy workaround, but I ended up using two Gridviews - one to display my data and show my checkboxes, and the other which was invisible amd would eventually end up as my Excel spreadsheet.
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