xla

Change .xla File with MSBuild

I'm trying to create a build script for my current project, which includes an Excel Add-in. The Add-in contains a VBProject with a file modGlobal with a variable version_Number. This number needs to be changed for every build. The exact steps: Open XLA document with Excel. Switch to VBEditor mode. (Alt+F11) Open VBProject, entering...

How do I create a toolbar in an XLA document?

How do I create a toolbar for Excel using an XLA document? ...

How to remove xla from xls without renaming or deleting xla file?

I need to get rid of an XLA (excel add-in) from a spreadsheet, but everything on the web seems to point to renaming/deleting the xla file. This is not an option as the xla file is used by many other spreadsheets and is on a shared drive. Are there any other alternatives? ...

Deleting TableStyle from excel

Hi, I have added a TableStyle to excel workbook using the statement: ActiveWorkbook.TableStyles.Add("PivotTable SS") I can delete it using: ActiveWorkbook.TableStyles("PivotTable SS").Delete How can I programmatically check if it already exists before deciding whether to delete or not? Currently I am looping through all the table...

Unable to delete a pivot table style from excel work book

Hi, I am using the follwowing code to delete a table style from an excel file: Set objTS = ActiveWorkbook.TableStyles("MyTableStyle") If Not objTS Is Nothing Then objTS.Delete End If I am able to delete it using a macro on my local excel sheet. However, when the above code is encapsulated in a function in an XLA code on the server...

Error while creating a table style in excel

Hi, I am using the following function to create a TableStyle: Public Function CreateTableStyle() ActiveWorkbook.Unprotect Dim objTS As TableStyle On Error Resume Next Set objTS = ActiveWorkbook.TableStyles("MyTableStyle") On Error GoTo err_CreateTableStyle If Not objTS Is Nothing Then Exit Function End If Set objTS = ActiveWorkboo...

Why is IE 7 renaming downloaded XLA files as XLS when saving?

I have an Excel Add-In file I'm publishing on an intranet (plain ol' HTTP download, not an attachment in Sharepoint, etc.). With IE 7, the user click the link and selects "Save", only to have the file renamed from "myaddin.xla" to "myaddin.xls". Firefox and Chrome work fine. Since they are trying to overwrite an existing file in the Li...

Excel VBA Recalculate Selection

I've got some Excel spreadsheets that are hitting the database pretty hard (100+ queries against the general ledger table... yikes!). Refreshing just the sheet I'm on (SHIFT+F9) is helpful in some spreadsheets, but I wanted a way to refresh just the selected cells. I'm came up with the following code, placed in the ThisWorkbook object: ...

How do I sign an XLA (Excel add in)?

And is is possible to do that from code? ...

Recover from fatal error in excel VBA Workbook_Open?

I stumbled on a way to crash excel in Workbook_Open while making an .xla It's still a toy project, so I've been able to just delete it and start over (and now I'm coming back with version control and baby steps.) However, assuming I didn't have those options, how would I possibly edit the .xla remove the fatal code, since I have to loa...

Excel 2003 - How to build my own XLA?

How can you make the .xla file if you want to create your own xla? I have the code, classes, shapes, etc....what is the process to making an xla file to point to? I know that I have to put it in my program files folder, and then go through the steps to adding an "add-in" in xls...but i mean actually saving an xla file to point to.... ca...

VBA: detecting if a library is available at run-time

I have an xla file that refers to some other Excel add-ins that may or may not be present on the target machine. Currently Excel fails on loading the xla with a "Compile error: Can't find project or library". Code is something like: Dim result as Integer result = SomeAddIn.SomeFunction(x) Prefixing this with an "On Error Goto Add...

How to stop Excel storing the absolute path to an XLA?

I have an XLA file that is to be deployed to a number of users in the organisation as an Excel add-in. My intention is to deploy it to a directory in the user's "documents and settings" folder in "Application Data\MyCompany". (In fact this is all working through a wrapper that copies the latest version of the XLA locally and installs it ...

Add-in makes Excel crash when starting minimized

I start Excel from within my C# WinForms application using Process.Start(...) (this has a reason). I want to start it in background, without distracting the user, so I try to start it minimized or hidden. In both cases, I experience a very weird behavior: After some seconds, Excel restores the window (even makes it visible if it's hidde...

Building an XLA from Source Programmatically

I have a (version controlled) folder of exported components of a VBA addin (i.e. a lot of cls, frm, frx, bas and txt files). Can someone give me a build script (can be a VB script, or something more complicated) that takes the name of this folder and produces a (working) XLA? I know you can programatically modify XLA files (e.g. this q...