excel

Excel replace value without losing formatting

I got an application that automates Microsoft Excel (2003) using Office Automation. One of the things it does is replacing values. The problem I got is that when replacing values, all rich formatting is lost as explained here: http://support.microsoft.com/kb/177194 To clarify, I replace valueX with valueY in a cell looking like this: va...

Find a column with specified text and then search rows for zero enries and delete whol reo if zero found

I need a macro to do this please - any know where i can find one? Find a column with specified text and then search rows for zero enries and delete whole row if zero found ...

Java servlet - export to an excell

How to make an excel file (and txt file) filled with data from a table on the html page in a servlet and send it to a browser? ...

What event fires if Excel VBA code execution is prematurely ended?

Is there an Excel Application or Workbook event that fires if code execution is ended from a run-time error? I use Application.Interactive = False at the beginning of some of my procedures. If the code execution stops before Application.Interactive = True at the end of the procedure, then the user gets locked out of the Excel. I don't ...

Excel 2007(.xlsx) Reading code using POI 3.5 in java?

Hi, I have downloaded latest POI version 3.5. I want to read the Excel file (.xlsx format) using the POI. If anybody has any Example source code or any URL or any other code snippet which can read the Excel file (.xlsx format) using the latest version of POI,which would be appreciated. Thanks, Mishal Shah ...

How to get the excel file name / path in VBA

Say, I'm writing a VBA inside my excel file sample.xls. Now I want to get the full path of sample.xls in my VBA. How do I do it? ...

convert xml to excel with multiple worksheet.

Hi.. if I export the below xml to excel 2007...i am able to get the excel sheet correctly. <Workbook> <Worksheet > <MyXml> <New A="111" B="222" /> </MyXml> <MyXml> <New A="111" B="222" /> </MyXml> </Worksheet> </Workbook> But I need a workbook with more than one worksheet...How do i specify the xml in this case ? ...

excel workbook isolated storage

can we create an excel workbook at isolated storage area using data from server side..in silverlight.? ...

Is this the RegEx for matching any cell reference in an Excel formula?

I have been trying to create a regular expressions pattern that matches any reference in any Excel formula, including absolute, relative, and external references. I need to return the entire reference, including the worksheet and workbook name. I haven't been able to find exhaustive documentation about Excel A1-notation, but with a lot...

Optimize SQL SELECT for 4000 searches, into Excel by VBA

How could this be optimized for speed by batching or other techniques? Its a 20MB Access2003 Database I am searching from Excel 2003 VBA. I have my Access Table Keyed (autonumber) so I though this would provide intelligent non-linear searching like binary searches. Currently searching for 4000 values from a table of 147k records is ta...

Excel cell Format Changes in text

Dear Sir, I have use microsoft Excel Sheet ..I've fell different Values in excel sheet there is no problem.. but i've fell some numeric Columns like this (00023785678).. in this columns first zero is not get it.. so i went to change the column in cells format of text.. how to create in Vb.net code.. already i have fell excel sheet ...

How to convert Excel to XML using java?

Hi, i want to convert my input Excel file into the Output XML file. If anybody has any solution in java for how to take input Excel file and how to write to XML as output,please give any code or any URL or any other solution. Thanks, Mishal Shah ...

Generating Excel file with some number of sheets with a single template.

Hi, i am generating an excel file with some number of sheets. I am using a template .xlt file which have one worksheet. Now I am able to generate the xl file with that template if there is only one worksheet in that excel file. But when I have to create more than one worksheet, I am unable to do that. Then the excel file do not use the ...

Moving images between cells in VBA

Hello guys, I have an image in cell (3,1) and would like to move the image into cell (1,1). I have this code: ActiveSheet.Cells(1, 1).Value = ActiveSheet.Cells(3, 1).Value ActiveSheet.Cells(3, 1).Value = "" However, it seems that the cell value is empty for cells containing images, so therefore the image is not moved and the image ...

Excel to XML code in java?

Hi, I need code in java for Excel to XML conversion. where Excel sheet will be used as the input file and XML file as the output file.we have to read the Excel file Row and column wise and than write that data to XMl file. please anybody give any Code or URL or any Repository of example,which would be appreciated. Thanks, Mishal Shah...

Excel changes date formats

I run a process to produce a rather large CSV file of data. Sometimes I find it helpful to open the CSV in excel, make changes manually, and then re-save. However, if there are dates in the CSV, excel automatically reformats them. Is there a way to prevent excel from doing this? It would be helpful if I could turn off all text format...

How to highlight data ranges in excel using C#?

Hi, I wonder is there a way to replicate insert chart dialog functionality using C#. What I need is to display a Popup window, but more importantly to let the user to select data ranges. I also want ranges highlighted with Excel's colorfull boxes. Here's an image of how excel highlights ranges when inserting a chart. I'd like to be able...

Excel: need help with unusual lookup function (sorted column is different from lookup column)

Hello, I am having trouble constructing a unusual lookup formula in Excel. Normally, I would use VLOOKUP(), but the pitfall is that I want to look up a number in a column from a table that is sorted on an other column. Vlookup can only lookup things on the sorted column itself. The scenario is as follows: The table is sorted ascend...

object array or collection in VBA Excel

i would like to have an array of objects in excel that call one event handler. specifically I have multiple buttons which perform the same function to different cells, and to keep from duplicating code I would like to simply reference these button objects via an index (like I used to do in VB 6.0).... by finding which button was clicke...

Excel: What's the best way to get the value of a Relative Row but from a Fixed Column?

The following formula will always return the value of the 4th column (D) of the next row. =INDIRECT("R[1]C[" & 4-COLUMN() & "]",FALSE) Is there a better way to achieve the same results? ...