What criteria should I use to decide whether I write VBA code like this:
Set xmlDocument = New MSXML2.DOMDocument
or like this:
Set xmlDocument = CreateObject("MSXML2.DOMDocument")
?
...
I want to take an action in an Excel workbook macro after a period of inactivity (hide/protect some worksheets). What is the best/simplest way to achieve this?
Í'm assuming I'll use Application.OnTime to periodically check if the user has been active. But what events should I handle to see if the user was "active" (i.e. has does somet...
Open-source or not. What's your experience using it? How's the learning curve?
...
I have a program that spits out an Excel workbook in Excel 2003 XML format. It works fine with one problem, I cannot get the column widths to set automatically.
A snippet of what I produce:
<Table >
<Column ss:AutoFitWidth="1" ss:Width="2"/>
<Row ss:AutoFitHeight="0" ss:Height="14.55">
<Cell ss:StyleID="s62"><Data ss:Type=...
I'm trying to call a web service from Excel 2003 module.
The way i've implemented it is creating a .NET COM library with all the classes/methods i need to be exposed.
When i try to call a method that queries a web service from Excel the execution just stops on that line without any error.
May be it has to do with references? I'm using Mi...
I have about 200 Excel files that are in standard Excel 2003 format.
I need them all to be saved as Excel xml - basically the same as opening each file and choosing Save As... and then choosing Save as type: XML Spreadsheet
Would you know any simple way of automating that task?
...
What function can I use in Excel VBA to slice an array?
...
What are some resources that will help get me up and running quickly with the Excel interop in C#?
...
VBA solutions can vary widely in size.
I would like to add user help documentation to all solutions but the level of effort to create and deploy the help needs to match the size of the solution.
...
I have an OpenDocument spreadsheet with macros in StarBasic/OOoBasic that I want to convert into an Excel spreadsheet, with the StarBasic macros translated to VBA. While OpenOffice.org claims to have the ability to translate VBA macros to StarBasic and back, my attempts to have OOo convert these original StarBasic macros to VBA have all ...
Apart from being horribly annoyed with Excel VBA ... I have this question:
Is there a way to catch a click on a cell in VBA with Excel? I'm not talking about the Worksheet_SelectionChange event, as that won't trigger multiple times if the cell is clicked multiple times. BeforeDoubleClick doesn't solve my problem either, I don't want to ...
Is there an easy way to create a table in SQL Server (2005) from an Excel spreadsheet. I'm thinking maybe some tool?
Thanks in advance.
...
Can VBA code instantiate and use .NET objects? The specific class I'm interested in is System.IO.Compression.GZipStream.
For Info GAC is the .NET Global Assembly Cache
...
I have a problem I'm trying to solve involving interfaceing a C++ program with Excel (an import interface, specifically). The SheetSelectionChange sounds like it will get me most of the way to where I need to be, but I can't find any good documentation or examples on registering the event, using its Range parameter when it's fired, and ...
I refresh Excel 2007 data connections via a C# program and OLE. Most of the work is done by a single Workbooks.RefreshAll() statement.
As is the nature of refreshing spreadsheets, various things can go wrong. During the refresh process, the program can give dialog box error messages about "Data cannot be read from file '|'", and a messa...
How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.
Excel 2007 has a possible range of 1 to 16384, which is the number of columns that it supports. The resulting values should be in the form of excel column names, e.g. A, AA, AAA etc.
...
I am creating an XLS worksheet that would be used to collect data from the users. I have restricted the user input using validations. In order to easily be able to print the worksheet i have set the lenghts of the columns. Have made the relevant columns wrap.
However i would like to protect the worksheet such that
User is not allowed to
...
I have a strange bug with WPF Interop and an Excel Addin. I'm using .Net 3.5 SP1.
I'm using Add-in Express to create a Custom Task Pane for Excel 2003. Within that taskpane I'm using ElementHost to host a WPF UserControl. The UserControl simply contains a Grid with a TextBox and ComboBox. My problem is that whilst everything displays pr...
I'm trying to build the example described at http://support.microsoft.com/kb/178749/EN-US/ in order to build an application that programatically accesses Excel using Automation. I have Visual C++ 2005/Visual Studio 2005. Some of the instructions don't exactly match up (classwizard, mostly), but the general idea seems to be the same.
...
I have a readonly Excel workbook containing a VBA application. The application saves any data that needs to be saved in a database, and the workbook is always closed without saving (by setting ThisWorkbook.Saved = True in BeforeClose).
I have the following problem:
User double-clicks on the workbook in Windows Explorer, workbook open...