excel

Show a form on all worksheets in an Excel file

I am writing a little generator script (using Excel VBA) to generate a bunch of source code, given various input from users. Currently I have one 'generator control' worksheet that provides access to the generation scripting tools. Here there is a button that pops up a little form with various generation options. Each portion of sourc...

Next non-blank cell in excel/visualBasic

I'm trying to script a very basic set of keystrokes in excel where I'm setting a cell to reference a cell that is 2 to the right and then the next non-blank cell down. Very easy set of keystrokes: = right right ctrl-down enter But when I use the macro recorder to do this it wants to substitute the ctrl-down with a relative referen...

Exporting to Excel the simple way (but not CSV)

Yesterday I found this How-To on exporting data to Excel spreadsheets by simply producing HTML. Seemed like a straightforward way of exporting cells with formatting, what one can not achieve using just CSV format. My idea was to process some data in a Java app, export the results to Excel spreadsheet and make use of Excel's capabilities...

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...

Ruby Percentile calculations to match Excel formulas (need refactor)

I've written two simple calculations with Ruby which match the way that Microsoft Excel calculates the upper and lower quartiles for a given set of data - which is not the same as the generally accepted method (surprise). My question is - how much and how best can these methods be refactored for maximum DRYness? # Return an upper quar...

EXCEL 2007 - Need Help creating a button which takes the contents of active worksheet and pastes it in a new worksheet

Hello! I have search throughout this site to find a answer to my problem and most of the related solutions are for a far more complicated problem. Here is what I need to have done. I created a simple form in Excel 2007. I am looking for the ability to add a button at the bottom of the form which allows the user to click on the button...

VSTO 3.0 Excel 2007 Addin Tab doesn't display

This is a very odd problem I've found. I have written and successsfully deployed a VSTO 3.0 Addin for Excel 2007. The problem is that the Tab for the Ribbon only shows up on NEW instances of Excel; the Tab doesn't display if I first open an already existing workbook. However, if I open a new instance of Excel, then open existing workbook...

How can I evaluate a string into an object in VBA?

In my previous question, How do I assign a value to a property where the property name is supplied at runtime in VBA?, I learned to use CallByName to set a property in a class at run time. This time, however, I'm trying to figure out how to get an object at run time from a string. For example, let's say I have a string with the followi...

Data needs conversion into columns from multiple-address-object-blocks (Excel / OpenOffice )

Each block contains 3 addresses - name, city, state, zip - how do I break it apart in OpenOffice/Excel? James R. Javier DDS Kent R. Nelson DDS Theodore G. Lund DDS 421 SW 335th St 1911 SW Campus Rd 2748 SW 315th St Federal Way, WA 98023-6192 Federal Way, WA 98023-6473 Federal Way, WA 98023-7832 H. Jung Song DDS Timothy J. Weaver DDS Sa...

using vlookup in excel to compare columns

hello members, I have some data with close to 250 rows in a excel sheet(Excel 2003) that needs to be compared. Appreciate if someone can help me with vlookup / any other excel routine that can help me achieve this. How do i filter out failed results ?Some sample data from my excel sheet: Condition to check: Where $E = $Q Check if rows ...

Export DataTable to Excel File

Hi, I have a DataTable with 30+ columns and 6500+ rows.I need to dump the whole DataTable values into an Excel file.Can anyone please help with the C# code.I need each column value to be in a cell.To be precise,I need the exact looking copy of DataTable in an Excel File.Please help. Thanks, Vix ...

Getting data from an Excel sheet

How do I load data from an Excel sheet into my Django application? I'm using database PosgreSQL as the database. I want to do this programmatically. A client wants to load two different lists onto the website weekly and they don't want to do it in the admin section, they just want the lists loaded from an Excel sheet. Please help becaus...

Biff exception in Java

When I tried to read an Excel file in Java it throws "biff exception". What does this mean? I tried to Google it but wasn't able to find a proper explanation. jxl.read.biff.BiffException: Unable to recognize OLE stream at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:116) ...

C# Create Excel (Done) then show/open it? Help

I can create an excel and save it, however I would prefer to show the document! Any help would be great!! Thanks Excel.Application xlApp; Excel.Workbook xlWorkBook; Excel.Worksheet xlWorkSheet; object misValue = System.Reflection.Missing.Value; xlApp = new Excel.ApplicationClass(); xlWorkBook = xlApp.Workbooks.Add(mi...

Iterating Through a Class in Excel VBA

I have created a class module for an entity called Terminal. I have a method that populates this class by going through 175 seperate worksheets and pulling the correct data from specific cells. This process is very quick (about 2 seconds), however when I try to write this data back out to a new worksheet, it is taking much longer (45 s...

In Excel 2007 conditional formatting, how to format an entire row based on the content of a cell of a locked column?

I want to apply a conditional formatting to the entire sheet. In particular I want to format a row by the value of its cell in a particular column so that if column F contains "something", the entire row is formatted (e.g. red background). How can this be accomplished? ...

How do I create an Excel .xlsx file on-the-fly on ASP.NET Webforms site ?

I need to export timetable from the database to Excel file on-the-fly on ASP.NET WebForms site. When user clicks "Export to Excel" link, he gets this file generated. I don't want to generate it explicitly and store on a server to provide download-on-a-demand, because then it'll be hundreds of files. I have all the data to do it, so the q...

Excel: Default to TEXT rather than GENERAL when opening a .csv file

Is is possible to change the default data type Excel uses when opening a .csv file? I would like Excel to default to TEXT rather than General for the Column Data Format when reading a .csv file. I would like to be able to open a .csv without having leading 0's removed from my data. Currently I use the Import External Data wizard when re...

Data type mismatch in criteria expression From Excel file through OLEDB

I am processing an uploaded file through a ASP.NET page. I am using the following connection string: string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + excelFile + @";Extended Properties=""Excel 8.0;HDR=YES;"""; Here is the SQL statement: string sql = "SELECT * FROM [Sheet1$] WHERE [req_tf_order_no] <> ...

VBA: How do I find a cell containing a substring in a given range?

Say I have a range of data from A1:Y55 containg data like "123 UID" I am looking for a unique substring (in this case, the UID) in that range, how do I do this? ...