excel

How do I invoke the IE 'onblur' event from VBA code in Excel?

Situation: I am working to populate text entry boxes in a webpage with data from Excel. When the data is entered manually and the focus is moved to another text box, the 'onblur' event is fired to do input validation. Desire: I want to be able to cause the 'onblur' event to be fired when I populate the same text boxes from VBA code ...

Export a C# List of Lists to Excel

Using C#, is there a direct way to export a List of Lists (i.e., List<List<T>>) to Excel 2003? I am parsing out large text files and exporting to Excel. Writing one cell at a time creates way too much overhead. I chose to use List<T> so that I would not have to worry about specifying the number of rows or columns. Currently, I wait unt...

Excel & Microsoft.Office.Interop

I want to use the Microsoft.Office.Interop to read an Excel file from a web page. Do I need to have Office installed on my web server? I am not doing any manipulation to the excel file, just reading it in and storing the values to another page. I have no issues when I run on my local machine but I have Excel installed on my local machin...

excel formulaarray

hi why do i get the runtime error 13: type mismatch error while running the following code Application.Goto Reference:="R1C1:R232C221" Selection.FormulaArray = "=ROUND(a(),0)" Selection.Replace What:="a()", Replacement:="IF(IF(Sheet4!A1:HM232+Sheet5!A1:HM232=2,0," & _ "Sheet4!A1:HM232+Sheet5!A1:HM232)+IF(Sheet4!A1:HM232+Sheet5!A1:HM2...

Writing a web application in excel? Why not?

Before you start flaming, I'm going to tell you that I am trying to convince myself that this is a bad idea. Basically, I'm trying to create a website with some basic accounting functions. My friend, a consultant who only knows excel, asked if this could be an excel spreadsheet instead of a web interface. I found myself thinking, why i...

Excel 2007 - Catch open command bar button event

Hello, Prior to Excel 2007, we used to catch the open file event in Excel using vba so that we could show our own open dialog that knew how to find client folders. In Excel 2007 this no longer works, does anyone have any ideas on how it works now> The basic premise before was create a class with a commandbar button and a related event ...

How do I convert the SERIESSUM function to VB6?

On the Daily Dose of Excel website, written by the late Frank Kabel, there are some formulae which can stand in for ATP functions. Not being an Excel guru, I'm struggling with converting one (so far!) to VB6. (Why I'm doing this I may relate once the NDA runs out.) The problem I'm having is with the code standing in for SERIESSUM, namel...

So my Excel-VBA project password can easily be cracked... What are other options?

Now that I know that there is an easy workaround to the standard way of locking and password-protecting VBA code, I'd like to move on to more effective ways of protecting code. I am to deliver an Excel-based tool to a client, but would like something more than simple annoyance-type protection that will only deter the very laziest of hack...

Possible to send message to excel userfom control

As I understand it, excel userform controls are windowless (at least majority of them). Due to this fact, would it be possible to update an excel userform using win32 ? ...

Setup an Excel template so calculations are not dependant on a specific number of columns / rows

Problem Statement: I'm creating a template for multi tiered complicated calculations in MS Excel that depend on a few input "n x 3" matrices. It is really difficult to redesign the 15 sheets or so (200 ~ 300 lines each) every time I have a different "n" where "n" ranges from 3 to 900. Goals: I'd like to input the number of "n" in ...

Can I rewrite a Javascript function using Excel VBA?

Hi, Don't know how to do this at all, but if the onclick of a button is similar to below: onclick="ConfirmAvailable();" function ConfirmAvailable() { if (document.getElementById("AvailableCB").checked) { return YesNoDialog("'Are you sure?'"); } else { return true; } } Is it possible, if I set ConfirmAvailable()="" using Exce...

How to combine multiple Excel files into single Excel workbook with multiple sheets?

I need to develop a service (either WCF or Java) that can take multiple single-sheet Excel files and combine them into a single Excel workbook with multiple sheets. The Excel files are actually exported from crystal reports as individual files. Following are some of the requirements of the service: 1) Should preserve all the formatting...

Opening an Excel spread sheet in .NET on a x64 system

I can't open an Excel spread sheet with .NET on an x64 server using the following connection string "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + filePath + "; Extended Properties=Excel 8.0;" I get The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. I installed the 2007 Office System Driver: Data Conne...

Excel Interop: Formatting Footers

I am creating an Excel Worksheet from C# using Microsoft.Office.Interop.Excel, and I have not been able to get the footers the way the User wants them. 1) How can I put footer text in BOLD? 2) How can I put the page number in the footer? (Putting @"Page @[Page]" in as text does not work.) Possible? Not Possible? ...

Export DataTables into multiple Excel worksheets

I've got a load of DataTables that I want to export into several Excel worksheets (in a new spreadsheet / Excel file). The "solution" that already exists in the code I have is two nested for loops, iterating over all the rows and columns, inserting data cell-by-cell. This isn't ideal as the process takes well over 10 minutes. There's a f...

Compare rows in a spreadsheet with records in a database

I have an Excel spreadsheet provided as a report, when really its more of a database, with the row number acting as primary key. I need to compare some columns in this set with a different set of records from an Access 2007 database. To make matters more complicated, this needs to be done automatically, without user input, on a regular...

Producing dynamically generated range names in Excel using c#

What is the best way to produce several tables of unknown size on the same worksheet? Values will be pulled from an oracle database and are used as values on several tables. Is it possible to create dynamic named ranges or is some other method desirable? I have some experience with c# but do not have access to VSTO 2005. Any help or...

Producing more complex excel worksheets using c#

I am required to produce a somewhat complicated excel workbook containing over 30 worksheets, each using information from several database tables to dynamically draw several tables per sheet, with formating. I have used c# in the past although I am unfamilar with its use in Excel. Any recomendations regarding to how to format and posis...

Excel RoundUp vs .NET Math.Round

Guys, in Excel, =ROUNDUP(474.872126666666, 2) -> 474.88 in .NET, Math.Round(474.87212666666666666666666666667, 2, MidpointRounding.ToEven) // 474.87 Math.Round(474.87212666666666666666666666667, 2, MidpointRounding.AwayFromZero) // 474.87 My client want Excel rounding result, is there any way I can get 474.88 in .NET? Thanks a lot ...

Macro to copy select rows to another worksheet and sort by month

Does anyone have a macro that will take data from a compiled list, sort out a particular month, the paste only the sorted month into a new worksheet? What I am setting up is a log where the samples are placed in the "Full List" by all employees and then when the boss wants to view only a certain months samples say January, he will be ...