excel

Is there a way to add more than one hyperlink in an excel cell in vb.net?

I have an excel sheet where one column consist of comma seprated hyperlinks. However, I am unable to see a way to insert more that one hyperlinks in an excel cell. Is there a workaeround this? ...

SSIS Data Flow Task Excel Source

Hi, I have a data flow task set up in SSIS. The source is from an Excel source not an SQL DB. The problem i seem to get is that, the package is importing empty rows. My data has data in 555200 rows, but however when importing the SSIS package imports over 900,000 rows. The extra rows are imported even though the other empty. When i...

What is the C# equivalent to LINEST from Excel?

Is any inbuit function is there or we need to write our own. In later case could you please give me some link where it has been implemented. And how it works? Thanks ...

Dynamically Populate Listbox - Exclude Empty cells

I am creating a form in excel (not a userform) and I am populating the listbox using cells. However, these cells are sometimes A1:10 and sometimes they are A1:A4. Is there a way to dynamically change what is shown in the listbox? Right now, when I use A1:10 and there are only 4 cells populated, I get the list of 4 populated cells follow...

Calculating percentiles in Excel with "buckets" data instead of the data list itself

I have a bunch of data in Excel that I need to get certain percentile information from. The problem is that instead of having the data set made up of each value, I instead have info on the number of or "bucket" data. For example, imagine that my actual data set looks like this: 1,1,2,2,2,2,3,3,4,4,4 The data set that I have is this:...

How to communicate between ASP.NET and an Excel workbook

Is there a way to load an Excel document in a web page and communicate with the excel control using code behind? (JavaScript or Asp.NET) ? ...

Excel > Microsoft Query > SQL Server > Multiple Parameters

Hi, Im relatively new to sql server and excel/microsoft query, I have a query like this Select ...[data]...B1.b,B2.b,B3.b From TABLEA Inner join ( SELECT ---[data]...sum(...) as b From TABLEB WHERE Date between [startdate] and [enddate] ) as B1 Inner join ( SELECT ---[data]...sum(...) as b From TABLEB WHERE Date between [startdat...

Need help with Excel 2007 Formula - Many to many update

I'm experienced with database development, but not so much with Excel. I'm looking for help writing an Excel formula that would help my client's spreadsheet behave like a database. This is what I'm looking to do, but I can't figure out how to write it in Excel 2007: "If Q4 (on sheet 2) contains A2 (on sheet 1), append A1 (on sheet 1) w...

How to speed up dumping a DataTable into an Excel worksheet?

I have the following routine that dumps a DataTable into an Excel worksheet. private void RenderDataTableOnXlSheet(DataTable dt, Excel.Worksheet xlWk, string [] columnNames, string [] fieldNames) { // render the column names (e.g. headers) for (int i = 0; i < columnNames.Len...

Saving Excel Spreadsheet using Interop C#

static void Main() { Application excelapp = new Application(); Workbook book = excelapp.Workbooks.Open(@"C:\HWYFAB.xlsx", 0, false, 5, "", "", false, XlPlatform.xlWindows , "", true, false, 0, true, false, false); Worksheet sheet = (Worksheet)book.Sheets[1]; Range cell = (Range)sheet.Cells[3, 2]; Console.WriteLine(cel...

Why can't set cast an object from Excel interop?

Trying to get a reference to the worksheets (using Excel interop): Excel.Application xl = new Excel.ApplicationClass(); Excel.Workbooks xlWorkBooks = xl.Workbooks; Excel.Workbook xlWorkBook = xlWorkBooks.Open(fileName, 0, false, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false,...

How do I use Spreadsheet::WriteExcel to create a chart from numeric log data?

I used csv2xls.pl to convert a text log into .xls format, and then I create a chart as in the following: my $chart3 = $workbook->add_chart( type => 'line' , embedded => 1); # Configure the series. $chart3->add_series( categories => '=Sheet1!$B$2:$B$64', values => '=Sheet1!$C$2:$C$64', name => 'Test data series 1',...

Automating Excel macro using python

I am using python in Linux to automate an excel. I have finished writing data into excel by using pyexcelerator package. Now comes the real challenge. I have to add another tab to the existing sheet and that tab should contain the macro run in the first tab. All these things should be automated. I Googled a lot and found win32come to d...

VSTO - How To Make IDE Show R1C1 Reference Style? And Import cond. formatting?

Does anyone know how to use R1C1 reference style, inside the IDE for a VSTO Excel Workbook project? I cannot find it in google or in the solution, and the ribbon button thing is not available in the IDE spreadsheet. Also - side question - anyone know why when I imported an excel file, none of the lookups or conditional formatting or nam...

how do i set a value to a range using a function from module in excel vba?

hello all, i want to do a simple function in a module in excel vba, so i can use it as a custom function in excel. (i use excel 2003, or 2007 , it's doesnt matter) i create a function(!) in a new workbook and it's looks like this: Function a() Sheets(1).Range("A1").Value = 4 end function but when i try to use it on the sheet1 it...

Excel plugin: Finding a Chart's Source Data Number Format String

I'm currently working on a plugin for excel (using VB.net--not VBA) that will attempt (among other things) to recognize the format of the source data of a chart and configure the chart's series' number format strings appropriately. That is, yearly data should always be two numbers, monthly data should always be a 3-letter month followed...

Using Excel sheet as a template vs. a "real" Excel template in OpenXML

Does anyone have any good answer what kind of difference there is between using some arbitrary pre-formatted Excel 2007 *.xlsx file as a template, loading it in my C# app, and filling up some of its cells with data using the Microsoft OpenXML SDK versus creating specific Excel templates (*.xltx) files and using those as basis for...

Add common prefix to all cells in Excel

I have a column with some text in each cell. I want to add some text, for example "X", at the start of all cells. For example: A B ----- >>>> ---- 1 X1 2 X2 3 X3 What is the easiest way to do this? ...

How to fill in Different String Values in Different Cells in Excel 2007 VBA marcos

Hello everyone, So I am trying to fill in Values "A-Z, 0-9" in a 2007 excel macro in four different locations (I am trying to put A-Z and 0-9 in cells: a1 to d9, e1 to h9, a10 to d18, and e10 to h18). So far I have the code: Sub TwoDArrays() Dim Matrix(9, 4) As Variant Dim Matrix2(9, 4) As Variant Dim Matrix3(9, 4) As Variant Dim Mat...

Excel macro to change external data query connections - e.g. point from one database to another

I'm looking for a macro/vbs to update all the external data query connections to point at a different server or database. This is a pain to do manually and in versions of Excel before 2007 it sometimes seems impossible to do manually. Anyone have a sample? I see there are different types of connections 'OLEDB' and 'ODBC', so I guess I n...