excel-2007

How to remove the recent document history in Excel Ribbon using VBA

How to remove the recent document history in Excel Ribbon using VBA. I am using the code below, but it doesn't seems to work. Sub Button1_Click() For i = 1 To Application.RecentFiles.Count - 1 Application.RecentFiles(i).Delete Next i End Sub Thanks ... ...

How to add a macro to the quick access toolbar of Excel 2007, attached to a workbook?

I'm using Excel 2007. I'd like to add some buttons to the quick access toolbar for macros. And because the macros are specific to the workbook, I want the buttons to appear only when the workbook is open. I clicked the office button -> Excel options -> customize. I found the macros in the left column, and chose "For (workbook name)" in ...

POI 3.6- XSSF API how can I lock specific user edit actions on a given Excel 2007 sheet?

I'm using the POI 3.6-XSSF API to write Excel 2007 documents, and i'm having trouble getting specific user edit actions of a given sheet to lock (i.e. lockDeleteRows). The API says that you need to call enableLocking() on the sheet but when I do that it locks everything and ignores my specific locking settings (example below). When I don...

Where is list of defined format styles for Excel using the OpenXML sdk

I'm using the OpenXML SDK 2.0, and I want to know where the list of defined format styles (and their values) is kept. Specifically, I want to know date/time formats. I want to open an xcel file, read a cell, and try to determine (based on format/style) if it is a date or date time value. Conversely, if I write data to a xcel file, and...

What are the benefits of using Classes in VBA?

Hi All! I am doing some VBA programming in excel 2007 and have one workbook where all the datasheets is to be copied from, into another sheet. The new sheet will have several header rows, and I would like to keep track of where they are situated so I don't have to find words in them constantly. Is the simplest thing to use classes and...

How to implement Custom Ribbon resizing in Excel 2007?

Hi, I'm working in a ribbon project for Excel 2007, using Visual Studio 2008 and VSTO, I'm trying to make my ribbon's groups collapse into galleries when I resize the Excel window, this is a functionality that the other tabs in the ribbon have (the tabs that come with Excel). At first, I thought this wouldn't be that much difficult, I i...

Excel AddIn - how to get formula from Formula Dialog

Hi All, I'm working on VSTO Excel 2007 AddIn in C#. I need to call Formula Dialog and than to fetch the formula string from that dialog. Problem is that dialog doesn't offer something like dialog.FormulaText but instead inserts formula in ActiveCell. So code like this: var dlg = this.Application.Dialogs[Microsoft.Office.Interop.Excel...

How do I create an executable application for a Excel macro procedure?

I've got two spreadsheets ("Old" and "New") and a VB Script macro. The macro runs in one ("New"), does a comparison of the contents of the other ("Old"), and then outputs the results back on to the "New" spreadsheet. I'd like to build an executable where I input the two file names and click a run button to simplify this procedure. The c...

Excel 2007 VBA signed certificate

Is it possible to create a certificate for an Excel workbook which has some VBA macros, and distribute the certificates to a small group of users? ...

How to assign certificates to excel macros programmatically

Hi, I have developed some code which creates excel macros and each time after creation of new macro I want to digitally sign the macro programmatically. Can you let me know if there is any way using which I can create new digital certificates and assign those to macro programmatically. Thanks. ...

How to troubleshoot drillthrough error in Excel 2007 -> SSAS 2008

I've created a cube in SSAS 2008, and have it deployed to my local server. I can connect to the cube via Excel 2007, and the pivot table and pivot chart work perfectly. When I try to drillthrough on a cell to see the detail rows, I get the following error: "The query did not run, or the database table could not be opened. Check the dat...

Fast third party library to merge excel files (.Net)?

Hi, i am looking for a 3rd party utility pack sort of library for .Net to handle excel merging with formating, formulas, charts and etc. which does its job well and if possible fast. ...

Create chart/statistics for selected mysql table through python

Hi all, I'd like to start by asking for your opinion on how I should tackle this task, instead of simply how to structure my code. Here is what I'm trying to do: I have a lot of data loaded into a mysql table for a large number of unique names + dates (i.e., where the date is a separate field). My goal is to be able to select a partic...

How do I implement an Excel (2007) host adapter for unit testing Excel Add-In in VS2008?

I have created an Excel 2007 Add-In and I would like to add a test project to test the code. I know I should do TDD but I did not know about TDD before hand :). I searched and found that I need to create a host adapter: Creating and Using Host Adapters. The samples from the SDK, however, are a "little" over my head. Has anyone already ...

Is there a way to capture HotKeys/Shortcuts in Excel VSTO using only C# and no VBA?

So I want to capture some key-commands in our Docuement-level Excel VSTO addin. I can't seem to find a way to do it, other than to use VBA and have our addin talk to the VBA. Any help/examples would be greatly appreciated. I am using Excel 2007. ...

How to find co-ordinates or Cell of picture object?

In Excel I have attached a picture to a cell using the following Sub InsertPic() Dim mPic As Picture With ActiveSheet.Range("D12") Set mPic = .Parent.Pictures.Insert("C:\abc.png") mPic.Top = .Top mPic.Left = .Left mPic.Placement = xlMoveAndSize End With End Sub Excel doesn't allow inse...

How to check if a cell has a picture?

In Excel, I want to check if a specific cell for instance "C12" has a picture? How could I do this? ...

Bugs in Excel's ActiveX combo boxes?

I have noticed that I get all sorts of annoying errors when: I have ActiveX comboboxes on a worksheet (not an excel form) The comboboxes have event code linked to them (eg, onchange events) I use their listfillrange or linkedcell properties (clearing these properties seems to alleviate a lot of problems) (Not sure if this is connected)...

Dynamic Excel Spreadsheets

All, In the past I created a lot of dynamic Excel (2003) spreadsheets in the following ways: 1.Using Excel COM object, 2.XML representation of spreadsheets, 3.SyncFusion controls for creating Excel Spreadsheets All the above generated from C#.NET Code Now my question is what are the best tehcnologies for creating Excel 2007 spreadsh...

Reading 39 digit number from excel sheet using c#

Excel cannot process data more than 64 bit (Big it will store it in powers of 10), but in our application I want 128bit data, for that I have formatted particular cell to be text format in excel sheet, so that I can enter very big number. Now I am able to enter big number, but not able to read that particular cell in code and also gives ...