excel

Is there a C# library that will perform the Excel NORMINV function?

I'm running some Monte Carlo simulations and making extensive use of the Excel function NORM.INV using Office Interrop. This functions takes three arguments (probability, average, standard deviation) and returns the inverse of the cumulative distribution. I'd like to move my code into a web app, but that will require installing Excel o...

Excel layout for hierarchical data

I am working on an excel bulk upload feature which has to be parsed using Java API. My problem is designing its layout. The data is hierarchical with 4 levels and one to many relationship at each level. 1-other data for node 1 -2-other data for node 2 -3-other data for node 3 -4-other data for node 4 And this repeats e.g. -...

how to set the color to excel sheet row in c#

Hi, I am reading the excel sheet as well as exporting the read excel. I want to set the Fill (backg color) color to header row of exported excel sheet.I am using C# +asp.net. ...

Accessing Excel formulas from clipboard in HTML / JavaScript

E.g. I got a cell with the formula LEN(A3). Pasting it to an HTML text area or an text editor will just paste the value. Is there a way to access the formula in a cell from the clipboard instead of the actual value? ...

How can I change Excels default XML output encoding?

Hi, I'm working on a solution where Excel data is exported to XML. I've implemented a schema and I get all the data exported properly. The one problem I have is that the solution that will receive the XML files expects ISO-8859-1 encoding, while Excel by default outputs UTF-8. Is there any way to change this? Oh, and I'm using the xml...

Best way to read an Excel file into an Access 2007 database

What's the "best" way to read (just read) an Excel file from within an Access 2007 application. I only want to loop trough the rows and put the data into an Access table. I don't want a import by hand (Get External Data dialog) but by VBA. The user gets a Form with a Browse button and then points to a Excel file with a defined content/f...

VBA Easier To Implement, ODBC vs OLEDB?

To create an ODBC connection in VBA, two things are required: Create a ODBC data source Add references in Excel What I'd like to know is if OLEDB has fewer requirements and is easier to implement. ...

Allow paste in worksheet without overwriting locked cells

I have a protected worksheet that users would like to copy and paste into. I have no control over the workbook they are copying from. The protected worksheet has some rows that are available for data entry, and other rows that are locked and greyed out to the user. The users would like to be able to paste over the top of the entire work...

Duplicate what is in the Textbox in other Textboxes on other sheets

I have four sheets in a spreadsheet. On each sheet there is a textbox. When I type in the textbox on sheet1, I want the textboxes on sheet2, sheet3, and sheet4 to populate with the same value. ...

Activating or Selecting a worksheet dynamically

Hello All, I'm dynamically creating a excel file using vbs and ExcelXML in javascript. Something like this. acdbCon.OpenConnection(); rs = acdbCon.GetRecordSet(GetQryABC(a,b,c)); workbookObj = new WorkbookXML("abc"); xmlBody.append(workbookObj.AddWorkbook().join("")); xmlBody.append(workbookObj.AddStyleSheet().join("")); abcObj = new a...

Looking for a good text parsing library for C#

Has anyone run across a quality library that will parse, line by line, CSV, tab-delimited, and Excel files? I've started to do it manually but have noticed some of the intricacies in parsing a comma-delimited file. Such as situations where a cell has a comma in it as part of the data (blah,\"LastName, Jr.\",blah,blah). ...

Fillng in excel cells automatically using data

I am wondering if and how this can be done: I have a spreadsheet that has three columns for Highschool name, State and CEEB code. As of now, we have to manually look up the CEEB code and fill them in. Is there a way i can give excel the entire list of all HSs and CEEB codes, so when I enter a High School and hit tab, it fills in the C...

Silverlight file upload - file is in use by another process (Excel, Word)

Hi, all. I have a problem with uploading of the file in Silverlight application. Here is a code sample. In case when this file is opened in other application (excel or word for example) it fails to open it, otherwise it's working fine. I'm using OpenFileDialog to choose the file and pass it to this function. private byte[] GetFileCo...

Validate data before uploading through SSIS

I have a SSIS package to upload data from Excel file into an Sql Server 2005 table. The excel file will have varied lines of data ranging from 20k - 30k lines. The upload works fine, when all the data are correct. But obviously fails when there is a small problem even in a single row. Examples like mandatory values presented null, inc...

Important packages and modules not compatible with py2exe?

Are there major/common/important packages that py2exe cannot handle? I am currently studying the possibility of creating a .exe from a Python program that will use Tkinter, some Excel file reading module, NumPy, SciPy and matplotlib: is it realistic to try to achieve this with py2exe? ...

Loop through worksheets without using VBA

Hi All, I need to total certain cells based on a condition across all worksheets in the workbook. The pseudocode would be Foreach ws as Worksheet 'total =SUMIF (A2:A5, "search term", B2:B5) Next MsgBox (total) But I don't want to use a macro. Any ideas? ...

Translate HRESULT to a readable message

Can anyone provide some information on how to programmatically translate HRESULT (http://en.wikipedia.org/wiki/HRESULT) values to a human-readable message? I know that the utility ERR.EXE does this, but my app needs to display some meaningful message to my users rather than a cryptic 0x800A03EC. ...

Determine Excel Version/Culture via Microsoft.Office.Interop.Excel

How can I achieve that in .NET/C#? ...

excel 2003 - unable to open file error

Using C# I'm able to export an aspx page to Excel when the Excel version being used is 2010. However, if I try to export the content on an XP machine with Excel 2003 I get a box that displays saying - Unable to open file. Is there something I need to add to the code that can make this go away and open the file? Here is what I have for ...

How to tell if a certain Excel file is open using VB.NET?

I'm exporting my Dataset to an excel file, and I want to make sure I keep any file errors under control. One in particular that I'm concerned about is accessing a file that's already open. A general IOException occurs that says "The process cannot access the file 'C:\Reports\report300.csv' because it is being used by another process." H...