excel

Pull info from Excel Spreadsheet into C# Web Application

I want to show information from an excel spreadsheet in a web page. The xls will have maybe 5 columns, and as many rows as needed. The columns will be 'Name', 'Created Date', 'Expired Date', 'Owner', and maybe down the road maybe more. What I would like is for the C# to nightly read the xls, and display the information in a table on th...

Installable ISAM not found

I have a requirement in which, i upload excel sheets to sql server database. The business logic is executed and display as reports in php. It is working fine till yesterday. Today i tried to upload excel files. It is throwing an error message stating:- The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" could not f...

Excel c# add cells to range

Is it possible to add cells to a range? Because the cells i need, aren't next to each other. Example: I need to add the cells with x in one range x 0 x x x 0 x x x 0 x x Is this possible? and if so, how? Thanks ...

ADOMD & Excel Integration

All, We have an Excel spreadsheet that uses ADOMD to query OLAP cubes and present the data in Excel. We are using version 2.8 at the moment of the ADOMD API. As far as I know there is an ADOMD.NET API for querying OLAP cubes. Can this new .NET version used from inside Excel ? Many Thanks, MK ...

Apache POI Time Cell

I need to detect, whether cell format is Date, Time or Datetime. My code is: if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC) { if (DateUtil.isCellDateFormatted(cell)) { if ( ??? ) return "Time"; else if ( ??? ) return "Date"; ...

c#-excel interop - create chart on workbook as opposed to in a sheet

Using c# MS Excel interop library, I would like to programmatically create a new chart on the workbook, as opposed to on an a sheet. The code below allows me to create a chart on an existing _Worksheet (sheet). using using Microsoft.Office.Interop.Excel; _Worksheet sheet; (assume this is a reference to a valid _Worksheet object) ...

Question about using Subtotal and CountIf in Excel Macro (VBA)

Hi, I wrote a previous post (http://superuser.com/questions/151092/neophyte-question-about-using-subtotal-and-countif-in-excel), which I realized was not very clear. But I could not figure out how to edit it. My apologies for both blunders. Here then, is a much simpler version (I hope). I need to write a Macro to take the following typ...

Simple to program yet computationally difficult functions

I need an example of a slow Excel sheet that could exist in the real world. Problem is I'm not sure what sort of functions are computationally difficult. Are there any sort of (maths?) functions that are easy enough to program that they can be used in Excel, yet computationally expensive? Something which has a real world application is...

vba: getting list of all files with ESY extension in a directory

in vba how do i get a list of all the files with a specific extension in a specific directory? i am unable to do application.filesearch, because i am using excel 2007 ...

What does this error mean in the contex of import excel data into a Sharepoint list?

After choosing 'Range Type:' Table Range and 'Select Range:' Sheet1!Table1 I get the error pop-up 'Import to Windows SharePoint Services list' 'Cannot connect to the server at this time. Your table cannot be published.' Is there somewhere in my computer I can look at for more information as to what I am doing wrong? ...

vba: get unique values from array

is there built in functionality in vba to get unique values from a one-dimensional array? what about just getting rid of duplicates? if not, then how would i get the unique values from an array? ...

what is the probability that the next random number will equal current one?

if i do this in a worksheet: =RAND() i also specified that i want only 2 decimal places and for example let's say that rand() = 0.07 what is the probability that when i call this function again i will get 0.07 ?? i know that ideally if we assume 100% randomness, the answer would be 1/ (10 * 10) because there are only 100 possible c...

Force column order, Excel data table

I have a Excel Workbook that I use as a report template. I change the datasource on each pivot and datatable in a C# app. When I change the datatable datasource it tweeks the columns. Is there a way to force the column order? private void RefreshRawData(string dataSource, string connection) { xl._Worksheet ws = (xl._Worksheet)xlT...

my macro is stuck how do i kill it?

i have a macro that goes through a directory and looks at all the files unfortunately it's on a mapped network drive and its really slow how do i stop the macro? ...

Pass a range into a custom function from within a cell

Hi I'm using VBA in Excel and need to pass in the values from two ranges into a custom function from within a cell's formula. The function looks like this: Public Function multByElement(range1 As String, range2 As String) As Variant Dim arr1() As Variant, arr2() As Variant arr1 = Range(range1).value arr2 = Range(range2).va...

vba: clear entire array

i have an array like this: Dim aFirstArray() As Variant how do i clear the entire array>? what about a collection? ...

vba: a forever loop

Sub something(tecan) On Error Resume Next Dim arr As New Collection, a Dim aFirstArray() As Variant Dim i As Long aFirstArray() = Array(Dir(tecan & "*.ESY", vbNormal)) aFirstArray(0) = Mid(aFirstArray(0), 1, 4) Do While Dir <> "" ReDim Preserve aFirstArray(UBound(aFirstArray) + 1) aFirstArray(UBound(aFirstArray)) = Mid(Dir, 1...

Webkit and Excel file(PHPexcel)

I have an excel file which can be downloaded..for example NAME.xlsx well it works in firefox but in webkit(safari/chrome) it appends to the name also the extension .xhtml so then name it will be NAME.xlsx.html it should be ONLY .xlsx Here you have my headers: $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); ...

oracle function like days360 in excel

Is there any oracle functions which will return the number of days between two dates like days360 function in excel? DAYS360 : "Returns the number of days between two dates based on a 360-day year (twelve 30-day months), which is used in some accounting calculations. Use this function to help compute payments if your accounting syste...

how can i get data from excel via "select statement" in sql 2005?

is there any method to get data from excel to sql ? i think that we can do without any writing C#codes. For example : select * from MyExcellFile.xls.Sheet1. Or may be any wizard in sql? ...