excel

Installing ExcelPackage with Visual Studio 2008 with C#

I need to install the ExcelPackage library on Visual Studio 2008. The .zip file I downloaded from their website (http://excelpackage.codeplex.com) contains a .dll, a .xml file, a "GacReg.exe" and a file called ExcelPackage (with this description: "Program Debug Database"). What are the steps to installing this library, or any library in ...

Excel Interop "FindAll" Method

This may be a duplicate question, but really don't know how else to word the title. Has anyone been able to find a method in the Excel Interop Library that exposes the "Find All" functionality from the "Find and Replace" dialog? There is Find, FindNext and FindPrevious, but no FindAll, which is odd. So far, this is the way I'm doing i...

Accessing Excel 2007 file format with OLEDB

I'm currently trying to access an excel 2007 file on a server that doesn't contain Microsoft Office on it. My connectionstring is something like this. String connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + file_path + ";Extended Properties=Excel 8.0;"; But this is for 2003 format, which works fine. I would li...

C#: Getting the number of rows/columns with ExcelPackage

I need to read and write data from an Excel spreadsheet. Is there a method to finding out how many rows/columns a certain worksheet has using ExcelPackage? I have the following code: FileInfo newFile = new FileInfo(@"C:\example.xlsx"); using (ExcelPackage xlPackage = new ExcelPackage(newFile)) { Exce...

Use Excel Interop to grab image of Excel chart without writing to disk or using the clipboard

The interface to the chart object in Excel only allows access to the image representing the chart through two methods: export, which saves the image to a file CopyPicture, which saves the image to the clipboard Both of these options are problematic (saving to a file is really slow, and saving to the clipboard could clobber user data)...

Why does Excel throw an exception on Quit when started from command line?

I have a simple Excel file that queries a database when it opens and then closes automatically. If I double click the file to open it from within Windows Explorer (I'm running Windows XP and Excel 2002), it works fine. However, if I run it using Excel "C:\DataUpdate.xls" from Start > Run or from Shell within another instance of Exc...

Beginner at Microsoft Office Macros

Actually, I'm not a beginner. I know nothing about them, though I do have some programming background. This is the thing: I have a couple of Word documents and an Excel spreadsheets. The documents need to grab some data from the spreadsheet and then print. There needs to be one document per spreadsheet row, and they need to be printed a...

How to separate CSV fields in Excel to be in separate boxes

For example, I have the following: fname;lname;email ...and it's all in one box. I would like it to be separated in different boxes, like: fname lname email How can I do this? ...

Predict text wrapping in cell, Excel 2000, using vba

The problem: I use VBA to populate MS Excel 2000 cells with text. The column has a fixed width (should not be changed due to layout) and the wordwrap property is set to true so the text wraps over multiple lines if wider than the column. Unfortunately, the row-height do not always get updated accordingly. I need a way to predict if the t...

Interactive heat map in Flex

Hi All! I’m at a very basic level with Flex and with programming in general. I am working on a project where I have data in an Excel (.csv) format, it’s a large Excel plot/matrix where each cell has a temperature number. I want to import this matrix into Flex somehow, or parse the data in Flex, so that this matrix turns into an interact...

Excel 2007 Sum variable length column.

I'm trying to make a macro to sum a variable length column. I've tried a few different things but they haven't worked. What I want to do is: If the active cell is cell B17, I'd like B17 to equal the sum of B1 to B16. Similarly if the active cell is cell D22, I'd like D22 to equal the sum of D1 to D21. So basically it is summing all the...

How to add particular value in starting of each row of an excel sheet

hello, i want to ask a question related to MS Excel. I have an excel sheet containing website addresses. The records counts nearly 3000. Now i want to filter it so that duplicates can be removed but the problem is that many web addresses (almost 2000 or so ) in my excel sheet start with httpfor example "http://www.google.com" and the r...

Giving duplicates in Excel a unique identifier

I have a large excel spreadsheet containing multiple address lines. Many of these adress lines contain duplicate postcodes, with differing steet adrresses. I need to seperate out each of these duplicates onto different spreadhseets, so that no one spreadhseet contains the same postcode. I'm currently using an =if() statement to iden...

Interfacing Between C# And Excel?

I am using C# interop to call a macro from C#. This works fine. However I am passing in an argument which the macro populates in the event of an error. app.Run(macroName, errrObj, Type.Missing, Type.Missing, Type.Missing, ........); Is there any way to get C# to actually read the new value that the arg is set too? Am I doing this...

substituting an Excel worksheet for an Access database

Hi. Sorry in advance for the rookie-ness you are about to hear..... I have VB application that uses an Access DB, call the database: db_1. For reasons best left unsaid, I have to substitute an Excel worksheet for db_1 - as far as the VB application is concerned. I hope to populate this new data on the worksheet, link the sheet into t...

Make the X and Y axis scales equal on an Excel chart

I'd like the X and Y axes of my Excel charts to have the same scale on the screen, because I'm plotting geographical data. A 1km by 1km square should look like a square, not like a rectangle, i.e. no squishing of the map in one or the other direction. In Matlab, the command that would do this is axis equal. How do I do this using VBA? (...

How to edit my excel dropdown list ?

How to edit my excel dropdown list ? i went to Data>validation>Settings> In that i found the values as =Attribute_Brands What i have to do for editing this? ...

Are Excel's Conditional Formatting Formulas Broken

Ok, so I am using excel 2007, and am trying to do some fairly complicated conditional formatting. Consider the following: =1=1 Highlights the cell. =INDIRECT(ADDRESS(2,COLUMN()))=5 Highlights cells in a column where the second row has 5 in it. =AND(1=1,2=2) Highlights the cell. =AND(INDIRECT(ADDRESS(2,COLUMN()))=5,1=1) Highli...

Excel VBA Colon

I have the following declaration in Excel VBA Public Const cdbArea = 1: Public Const cdbDist = 2: Public Const cdbChange1 = 4: Public Const cdbChange2 = 5: Public Const cdbTR = 5: Public Const crbArea = 1: Public Const crbDist = 2: Public Const crbTerr = 3: Public Const crbChange1 = 4: Public Const crbTR = 5: Public Const cdbWeek1 = 4 ...

MDX retrieve recordset

I am trying to match existing reporting functionality while building up a new cube for a Proof of Concept. Can I retrieve data from my cube using an MDX query and put it into a recordset so I can then populate an Excel Sheet with the data? ...