excel

Summing Duplicates in Excel

I have a long list of names of products and numbers of those products, I want to combine all the duplicate entries and add their numbers. So if I have 2 entries for Widget X, and each entry has 3 products, then I want to combine this to one entry for Widget X with 6 products. I've sorted the list out and summed them for each product but...

C# write to Excel using Linq

Hi, I'm writing an app where i need to retrieve some rows from a DB and dump them into an excel spreadsheet. I'm using Linq to retrieve these rows. is it possible to dump these rows directly into their couterparts in the excel sheet... (where one cell of excel corresponds to one cell of the DB) Thanks, RP ...

Spreadsheet ML Text Color (Colour) Rendering

Hi All, I am writing a tool which generates some Spreadsheet ML (XML) to create an Excel spreadsheet for my users. I have defined a style as follows: <Style ss:ID="GreenText"> <Font ss:FontName="Arial" ss:Size="9" ss:Color="#8CBE50" /> </Style> This works to an extent, but when I open it in Excel the colour rendered for the text ...

VB Excel: How to move Worksheet with Forms/Macros

Hello again. I'm having a problem transferring a worksheet into another workbook. I've written several macros in my first workbook, as well as 1 or 2 forms, and I need to be able to move this worksheet that contains these macros and forms into a new workbook. If I just do a simple worksheet copy, the new version of the worksheet will ...

Excel VBA "Autofill Method of Range Class Failed"

The following VBA code (Excel 2007) is failing with Error 1004, "Autofill Method of Range Class Failed.". Can anyone tell me how to fix it? Dim src As Range, out As Range, wks As Worksheet Set wks = Me Set out = wks.Range("B:U") Set src = wks.Range("A6") src.AutoFill Destination:=out (note: I have Googled, etc. for this. It comes u...

What is the maximum no of characters i can fit into an Excel 2003 msgbox?

What is the maximum no of characters i can fit into an Excel 2003 msgbox? ...

What is the best practice for allowing users to upload excel document?

I currently have a website (ASP.NET 3.5, IIS 7.0) that allows users to upload excel files for processing, should i be concerned with viruses and malicious code being executed when the document is opened. We are currently using the .net office interop assemblies to fetch the information from the document, the information isn't exactly ta...

Read Excel in editable gridview in asp.net 3.5

Hi, I can able to read the Excel sheet in grid. but I have grid that have textboxes & dropdown list (in template field -> itemtemplate ->Text box) . I want to be take data from Excel file in respective cell (textbox) of grid. Like we can take data from database by Eval() , is there any way to get such functionality? One think i know th...

How to Pass an Array from C# (VSTO) project to VBA Macro

I'm having performance issues with my VSTO solution, I believe the reason is mainly the way the cellColor is set cell by cell. This depends on data from a recordSet and is thus different everytime. (I can't use a copyFormats from another row/column) it's similar to filling a Range of values, only for that one there are several methods....

How to persist "data links/sources" from dynamic ListObject(VSTO) to other Excel components like Charts or Pivot Tables?

Hello, I am facing one an issue to persist "data links/sources" from ListObject to other Excel components like Charts or Pivot Tables. Steps to reproduce. 1) Create Excel AddIn. 2) Add a ListObject to the worksheet runtime 3) Assign a Datatable to ListObject 4) ListObject populate data 5) User add Chart or Pivot...

How can I format bytes a cell in Excel as KB, MB, GB etc?

I have a value in a cell that's in bytes. But nobody can read 728398112238. I'd rather it say 678.37GB To write a formula to format it relatively easy (here's one: http://www.yonahruss.com/2007/02/format-excel-numbers-as-gb-mb-kb-b.html) But is there any way to do this as a 'format'? I'd like to have the big number in the cell, but hav...

find formula in excel

is it possible to search for a certain text using =find(...... within a specific column like: C1:C2577 ...

Estimate the number of rows in an Excel file quickly

I've got a Ruby + Merb webapp that needs to quickly estimate (or count exactly) how many row a spreadsheet has. It accepts every format that the roo library supports, including .xls, .xlsx, .ods, and text-based formats like CSV and TSV. CSV/TSV is easy and fast: `cat #{filepath} | dos2unix | wc -l`.to_i However, using the roo library...

Can Excel use itself as a Database?

I found an interesting article at MSDN, which says: ADO makes it possible to treat an Excel workbook as if it were a database. So is it possible for an Excel workbook to connect to itself, and treat one of its worksheets as a database table and execute queries on it? -- and is this possible via VBA programming? ...

VBScript to Write a Macro within an Excel file

Is it possible for the VBScript to write a Macro within the excel file when it is generated that would be able to run whenever the file is opened? Ive got a VBScript to auto generate an excel file and some data within it, this runs once and generates the file with all the data/sorts etc. What I need is to have some interactivity that w...

Excel sheet manipulation

Here is what i have to do a webpage gives a excel sheet with if we set some conditions and hit get button,then i have to filter for some data on the excel sheet and put it on another excel sheet,like wise have to get data from different excelsheet and put it in a single file.How to do that. using javascript on page will be better. ...

Lock Excel Document after a certain Date

How can I cripple an excel document after a certain date? I want it to become unusable after, say, 12/31/2009. I was thinking about putting one of those Must Enable Macros things in there that hides all the sheets on close and leaves one tab that says you must enable macros. Then having an on open macro that unhides all those tabs, bu...

Excel : Refreshing specific formulas in worksheet programmatically.

Using Application.CalculateFull() i can refresh entire worksheet. Is there a way to refresh only specific formulas in the worksheet and not the entire worksheet? ...

how to check Excel Server is present or not?

I want to check the presence of ExcelServer on a legacy system. There are EXCEL spreadsheets present on this system.Also one can open, edit and save EXCEL sheets. But when I check the presence ExcelServer on the C:/ Program files...only 0 kb files are there under MS office(11)/ Excel. Som can 0 kb files deal be ok for an Working Excel ...

COUNTIF - establishing a specific range in excel

i have this formula: =IF(COUNTIF(C1:C2577,"CertainText")>0, "Present","Absent") but i dont want it to search in C3, how do i do this? ...