excel

I'd like to copy data from multiple sheets/tabs to a Master sheet

What I have is a spreadsheet with over 100 tabs with relatively the same format of data, but some sheets have more or less rows than others. I have a sheet named EMP_NUM with all employee numbers and names. I have a Master sheet that I would like all the relative data copied to the Master sheet. The employee numbers listed on sheet EM...

vba: return dictionary from function

this outlines what i am trying to do. this is not working for me, and it is unclear why. thank you in advance for any and all help. Sub mySub() dim myDict as Dictionary myDict=new Dictionary myDict=myFunc() End Sub Function myFunc() dim myDict2 ...

Algorithm for finding a set of regions containing a cell

I am working with some spreadsheet data and I have a set of cell regions that are of arbitrary bounds. Given any cell, what is the fastest way to determine the subset of regions which contain the cell? Currently, the best I have is to sort the regions with the primary sort field being the region's starting row index, followed by its en...

Fill back color of inactive cell

Hello All, Can anyone help me on how to fill the background color for all of inactive cells in my excel workbook. This will be done using POI library and vb.net 2003 or maybe in java. ...

How can I insert data from one sheet to another sheet using POI?

How can I insert data from one sheet to another sheet using POI? I have a template and have a default sheet, What I want to do is to create a new sheet to insert another data when my previous work sheet have reach a maximum rows in excel of 65536. ...

Get cell style from excel spreadsheet with C#

Im trying to copy some cells from one workbook-sheet to another workbook-sheet and preserve the style and formatting using C#. I can get the attributes one by one like this: string fontName = ((Excel.Range) workSheet.Cells[3, 2]).Font.Name.ToString(); But Im looking for at way to get it all at once. Thanks ...

Convert XML to CSV using XSLT

How to convert XML to CSV (to be shown in Excel file) using XSLT? Provided XML value itself contains comma, e.g. <name>The,Bad Boy</name> My logic considers "The" & "Bad boy" as separate values as it goes in different columns after opening in Excel file. ...

Saving an Excel Workbook on the Server through ASP.NET and IIS7

Hi, The following code samples produce the same error when I perform the SAVEAS: Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application(); filePath = (string.Format("{0}.{1}", Path.GetTempFileName(), "xls")); ...do some stuff to the workbook ... excelApp.DisplayAlerts = false; excelApp.A...

Hiding a sheet in Excel 2007 (with a password) OR hide VBA code in Excel

I found a way to hide Excel sheets which is as follows: set the visibility of the sheet to VeryHidden in the VBAProject properties and then password protect VBAProject properties. This is great, but in Excel 2007, if you save it as XLSX, the VBAProject password protection is stripped and you can view the VBA code. Is there any way to pr...

How can I distribute a number of values Normally in Excel VBA

Hi All, Sorry I know the question isnt as specific as it could be. I am currently working on a replenishment forecasting system for a clothing company (dont ask why it's in VBA). The module I am currently working on is distribution forecasts down to a size level. The idea is that the planners can forecast the number to sell, then can sp...

How Do I Convert an Excel XLS to an Access MDB using Excel VBA

I need to use VBA from Excel to load an Excel workbook in access and transfer it out to a database. Dim acc As New Access.Application acc.OpenCurrentDatabase "C:\Test.xls" I got that far and Excel crashes and has to restart. My plan was to use the following but I can't get that far. acc.DoCmd.TransferDatabase Any ideas? I've googl...

Extracting Unique values from a list

I have the following code that returns 50 random color-coded numbers: Sub RandomNumberColor() Dim Numbers, i As Integer Dim MyRange As Range Set MyRange = Worksheets("Rnd").Range("A1:A50") For i = 1 To MyRange.Rows.Count Numbers = Int((10 - 1 + 1) * Rnd + 1) Worksheets("Rnd").Cells(i, 1) = Numbers Worksheets("Rnd")...

Most effective way to create Excel files

Looking for a PHP solution to create Excel files on the fly (Think dynamic reporting). Now I have seen PHP Excel and I know I can create a CSV file but are these by best options? I running this script on a Linux system using PHP Excel but it doesn't set all the options $objPHPExcel->getProperties()->setCreator("Phill"); $objPHPExcel...

How to programatically create button on Excel worksheet in C#?

How can I create a button (or a shape) on an Excel worksheet using C#? I am currently doing it with the code below, but I encounter two problems: the button gets moved when the columns to its left are resized the button does not respond when you select or right-click it, so there is no obvious way for a user to manually delete it from...

Excel Interop currency format

Hey everyone, I'm attempting to format a cell in excel to the currency format. So I go into excel, record a macro of me converting an ordinary cell to a currency format, take a look at the vb script and see that it outputs the following: NumberFormat = "$ #,##0.00" So i take that format and paste it into my code, it works to the exten...

Pattern of grey color.

<?php require_once 'Spreadsheet/Excel/Writer.php'; $workbook = new Spreadsheet_Excel_Writer(); $format6 =& $workbook->addFormat(); $format6->setBgColor('green'); $format6->setPattern(6); $worksheet->write(1, 1, 'the bg', $format6); $workbook->send('setBgColor.xls'); $workbook->close(); ?> Can you please tell me the the pattern for ...

excel array column double/triple/etc.. consonant generation

How would I auto generate an array (in PHP) for AA - ZZ and so on like AAA - ZZZ $column_arr2= range("aa", "zz"); // NOT Working $row_arr = range(0,1000); $column_arr = range("a", "z"); echo "Column2<pre>".print_r($column_arr2, true)."</pre><br />"; // prints a - z echo "Row<pre>".print_r($row_arr, true)."</pre><br />"; echo "Column...

Point to a relative other Sheet in Excel

I'm trying to find a way to from a Cell get the data from a cell in the Sheet that lies to the Left (down in the tray) of the current Sheet. I know how to call to other sheets via =Sheet1!A1 But now I need something best explained with =Sheet[-1]!A1 Any ideas? ...

Invalid cell coordinate phpExcel

Ok I'm dynamically generating the cell coordinates but I get this error, why? Error: Exception: Invalid cell coordinate. in /var/www/test/excel/pe/Classes/PHPExcel/Cell.php on line 490 Call Stack: 0.0003 81132 1. {main}() /var/www/test/excel/createExcelReport.php:0 0.0225 2691000 2. PHPExcel_Worksheet->setCellValue...

Excel Macro _ Linux communication

The excel files in on Linux cluster and we are using Win7. Our process is run a program on linux cluster multiple times. The process is a loop of 2 simple steps: Win7: Open excel file, run macro to generate data Linux: Run program, update data back to the excel file Win7: Open excel file, run macro to generate data Linux: Run program, ...