excel

Excel XML Line Feeds in Fields

I' trying to get the following string to output to a cell in Excel using the 2003 XML capabilities "Cheese\nBread" and at the moment it ignores the line break. If I create a file with the desired effect then I get the following output <Cell ss:StyleID="s62"><Data ss:Type="String">Cheese&#10;Monkey</Data></Cell> Okay, so I try doing.....

Excel: How can I display the data from several sheets in one?

I have written a script which creates a complex Excel sheet which contains data from several data sources. The data on each sheet is usually 1-5 rows. It would be great if I could create another sheet which would display the data from the other sheets online (i.e. the overview sheet should change as I change the data sheets). I also need...

How to react to Excel events in Ruby?

I can find 10^1000 examples of scripting Excel using Ruby, but I can't for the life of me figure out how to have Ruby react to events in Excel. I'm trying retrieve the contents of a row in a worksheet when it's selected, but such an event-based retrieval I can't find any methods or examples for. ...

How to embed excel in word programmatically?

Are there any way to do so? I prefer to use VB.NET or Java and try to avoid to use VBA. Thanks! ...

How to export Excel worksheets into new workbooks

I have a bunch of Excel workbooks that contain multiple worksheets. I want to loop through each workbook and export each worksheet into it's own new workbook. I want one worksheet in each new workbook. Here's what I've got so far: Sub ExportWorksheet(ByVal worksheet As Excel.Worksheet, ByVal filePath As String) Dim xlApp As Ex...

Excel Determine Range

I am creating a spreadsheet which has a column of data, and I would like to calculate the varaince of x number of rows based on x inputed. Any advice? ...

What in the best Excel book for non-programmers?

I've been asked to help a friend that is a non-programmer to understand Excel formulas, particularly the less linear ones such as 'if' and 'vlookup', is there a book I could recommend? ...

In VBA, how to return an array / or write to cells using a function?

Using this very simple function: Function WriteArray() as Variant Dim array(0 To 2) array(0) = "A" array(1) = "B" array(2) = "C" WriteArray = array End Function I was expecting to see in result the whole array in my Excel spreadsheet, but that's not the case: I get only the first string. I know there is trick to show the whole ar...

Using WCF with Excel 2003?

Hi there, Does anyone know or can find some sample code showing how to call a WCF service using Excel 2003? ...

Excel: How to add double quotes to strings only in CSV file

I want to create a CSV file from Excel in which string values should be in double quotes and date values should be in MM/dd/yyyy format. All the numeric and Boolean values should be without quotes. How would I go about this? ...

How to add/Delete lines of code to a "ThisWorkbook" of excel file using vb.net?

As per my application I want to write some Lines code in "ThisWorkbook" of Excel file using vb.net,before that we need to check the file for existance of code. Please let me know any code or links for reference.. thank you... ...

How to fill-up cells within a Excel worksheet from a VBA function?

Hello, I simply want to fill-up cells in my spreadsheet from a VBA function. By example, I would like to type =FillHere() in a cell, and in result I will have a few cells filled-up with some data. I tried with such a function: Function FillHere() Dim rngCaller As Range Set rngCaller = Application.Caller rngCaller.Cells(1, 1) = "...

Excel: A shape event handler (OnAction) that calls into my .net/shim code

I have a COM addin for Excel that adds a new toolbar/menu to Excel. One of the command reads a file and adds picture to the current worksheet. The pictures when clicked, calls a macro inside an XLA file that calls the method in a .net addin. The problem is that I had to create a .XLA addin just for this call routing because Shapes cann...

How to convert Excel sheet column names into numbers?

I was wondering what is the best way to convert excel sheet column names into numbers. I'm working with Excel Package, a good library to handle .xlsx documents. This library unfortunately doesn't have this functionality included. OBS: The first column, A, corresponds to number 1 in this library. ...

Copying Excel Worksheets in POI

Does anyone know of a means to copy a worksheet from one workbook to another using POI? The Workbook class has a cloneSheet method, but there doesn't seem to be able to insert a cloned sheet into a new workbook? If there isn't an API to do this easily, does anyone have the code to copy all of the data (styles, column widths, data, etc) ...

How can I use JavaScript within an Excel macro?

There’s a really cool diff class hosted by Google here: http://code.google.com/p/google-diff-match-patch/ I’ve used it before on a few web sites, but now I need to use it within an Excel macro to compare text between two cells. However, it is only available in JavaScript, Python, Java, and C++, not VBA. My users are limited to Excel ...

Read from Excel using OleDb in a Windows Service?

Disclaimer: I know this is a bad way to do things. It is the only option we have with our client. Problem: We need to read data from an Excel file every x amount of time. The data is constantly changing via a 3rd party Excel plug in. The environment for the application is Windows XP, SP1 and .Net 2.0. No upgrading the OS to SP2/3 o...

How do I output more than 255 characters in an Excel cell using Spreadsheet_Excel_Writer() in php?

I am trying to output a few paragraphs of text in an Excel spreadsheet, but right now the text is truncated to display only 255 characters. The code is pretty straightforward: $xls =& new Spreadsheet_Excel_Writer(); $sheet =& $xls->addWorksheet($name); foreach ($rec as $field) { $rec = ($rec['data'] ? $rec['data'] : $rec); $sheet...

VSTO adding menu item to Excel 2003 with C#

Hi there, I'm developing an Excel 2003 add-on and trying to make my own menu like so: Application.ScreenUpdating = true; Application.MenuBars.Add("MyMenu"); Application.MenuBars["MyMenu"].Menus.Add("MyMenuItem1", null, null); It seems to run just fine but I can't see my menu at all. any ideas why? ...

Get data from custom app into EXcel

I would like to be able to link some data from a custom application to a cell in Excel. What tech would you use to do that? I'm primarily a Unix-developer, and don't know win32 technologies in depth. But as far as I understand DDE would be the easiest, even though it is very old tech. Being able to use it with other office suites such ...