excel

Macro to Insert Information Between Rows Repeatedly

I want to insert a list (below: generator, control tower, etc.) repeatedly throughout a spreadsheet. It should be inserted every other row (after each Turbine) and offset one column as shown below. I don't know how to write a macro to do this automatically. Any help is appreciated. TURBINE A-2 Generator Control Tower Brak...

What is the most efficent way to get a Range "set difference" in Excel Automation?

Given a pair of ranges, where one is known to contain elements of another: src = ActiveSheet.UsedRange sel = src.SpecialCells(xlCellTypeVisible) what is the most efficient way to get a new range that represents the set difference between these two ranges, i.e., the cells in src that are not in sel? This can be done using a loop over ...

Need to embed Excel worksheet in .NET application

Hi, I need to embed an Excel workbook/worksheet in a .NET WinForms application. So far, i have found only one way of doing it - by adding a Web Browser control to the application and navigating to an Excel file using this control. This is a very cumbersome solution. Is there an easier way of doing it? Thanks! ...

Import Data from MS Excel using Java Source Code

I want to Import data placed in MS Excel and print it using Java Application Program. I am newbie in Java. So Please guide, is it possible. If yes, how? Any website/tutorial will be of great help.. Thanks in advance.. ...

For loop with non-contiguous range

I have a loop that runs through each column and sets the value to an R1C1 sum of a few rows above it. I'm using a for loop, but I want to skip a few columns, as they contain formulae already in the cell. How can I set up a loop that only cycles through a non-contiguous set or numbers? For reference, I want it to cycle through columns 1...

Programmatically access chart source data name

I have some charts I've copied over from an identical workbook, but the source data for each chart (42 charts, with 6 series in each) still contains the full filename path. The source sheet and cells are identical, so I just want to find the path string and replace it with "". However, I can't find a way to get the name of the sourcedata...

Questions about Excel worksheet embedding in WinForms application

I embed Excel worksheet in a WinForms C# application in two ways - using WebBrowser control and using dsoFramer control. In both cases i'm facing the following two problems: 1. How do i make my embedded spreadsheet read-only? The only way i discovered is by protecting the underlying Excel file, but it causes annoying message boxes to pop...

Converting Excel 2003 Workbook to Excel 97 in C#

How would I convert and Excel 2003 Open XML Workbook to Excel 97 Format using C#? ...

Numeric precision issue in Excel 2007 when saving as XML

I am encountering a strange issue when saving documents in XML Spreadsheet 2003 format using Excel 2007. It seems to randomly change numeric values such as "0.58" to "0.57999999999999996". What's really odd is that you CANNOT see this issue when you are in Excel. You can only see this when viewing the XML data directly from a text edi...

Exporting VBA code from Multiple Excel documents to put into version control

Does anyone know a way to export the VBA code from a number of Excel documents, so that the code can be added into a subversion repository? Without having to manually open each document and export the code. ...

IndexOutOfBoundsException when trying to read MS Excel file using Apache POI-HSSF

Whilst trying to parse MS Excel file using POI-HSSF v3.2 I am getting IndexOutOfBoundsException. The spreadsheet I am trying to read isn't empty it has been created using MS Excel 2003 and BiffViewer included with the POI package has no problem parsing it. My code is as follows: package src; import java.io.*; import org.apache.poi.hss...

Excel pivot chart linear time-scale

I have a data set (~10000 rows) with the following form: +---------------------------+---------------+-------------+ | DateTimeCreated | Machine | ProductName | +---------------------------+---------------+-------------+ | 2009-03-03 00:00:12.217 | COMP001 | Product001 | +---------------------------+------------...

How do I use a parameter in an Excel external data request?

I can already use Excel (2007) to import data from SQL Server 2005. I add a data connection and I enter a custom SQL query that retrieves my desired data. Cool. But what I'd like to add is the ability to parameterize that query based on a value found in a known cell on the spreadsheet. My query would go from SELECT * FROM dbo.MyDataTa...

Why does my VBA project fail in other computers?

I made a VBA project based on Excel and Access. When I copied to other computers, some methods (left, right, etc) or controls (ComboBox) sometimes disabled. I had to rebuild in that computer. But sometimes it's OK. Why? Is that because of licence issues? ...

How can I make my C++ ActiveX control print nicely in Excel?

I am trying to get my ActiveX control to print out nicely in Excel. The control is written in C++. Originally I generated the control using the Visual Studio 2005 wizard. I have tested this with a simple wizard generated control to experiment with the OnDraw function and I discovered that even a control straight out of the wizard doe...

odbc cause high mysql server load

I have heard that excel-based ODBC connections can cause high server load (repeatedly warned at least). Is this a catch-all disclaimer, or is there a serious issue here? I plan to have 5-8 excel sheets that would be open all day updating one table (with about 65 cells) every minute. ...

Reorder/shuffle values in a row/column in Excel.

Is it possible to shuffle randomly, values in rows or columns in a excel sheet. Is there any function/macro for that? How do i do this? -ad. ...

How can I embed an excel spreadsheet in a C# program.

I've been trying to use the ActiveX control axOWC10.axSpreadsheet but I can't figure out how to specify the DataSource and DataMember properties. Should I not be using this particular ActiveX control? ...

How do I call a Perl script from Excel?

I want to call a Perl script from Excel using VBA. I have used a shell command. I have also used the code below: Function Chk() Dim RetVal RetVal = Shell("C:\Perl\bin\Hello.pl", 1) End Function But the above function doesnt run the file. Is there any error? Is there any other way to call a Perl script or external program using Excel?...

opening excel file via c# application

Hi guys, My application using excel file in order to read data from web (using excel web query and reading the data from the excel file) The excel file I'm using called webGate. my problem is that I don't want webGate to be presented to the user. if the user opens excel file (any other file) while my application is reading the webGate fi...