excel

Adding filter to Excel sheet columns using SpreadsheetGear?

How to add filter to excel work sheet columns using SpreadsheetGear? ...

Using Excel.Application in ASP where Excel is installed on Client Machines instead of the Server.

Hi, I have a server with an asp page on it that generates a report in Excel, using the Excel.Application object. Normally, Excel would have to be installed on the server to work. I was wondering, however, if it is possible to utilise the excel install on client machines to do this instead, as I can't install Excel on the server? Thanks...

Excel VBA ComboBox2 doesn't get the right content

Hi, I'm having a problem with the content of a combobox. On my userform, there are 3 comboboxes. Depending on the chosen item from combobox1, combobox2 should display either set 1 or set 2. The same will be happening with the content of combobox 3, which depends upon the combination of chosen items from combobox 1 and 2. However, I'...

Excel and Tab Delimited Files Question

I am encountering what I believe to be a strange issue with Excel (in this case, Excel 2007, but maybe also Excel 2003, but don't have access to it as I write this). I can reliably convert some server data over into a tab-delimited format (been doing this for years) and then open it using Excel - no issue. However, what seems to be hap...

Why does CoUninitialize cause an error on exit?

I'm working on a C++ application to read some data from an Excel file. I've got it working, but I'm confused about one part. Here's the code (simplified to read only the first cell). //Mostly copied from http://www.codeproject.com/KB/wtl/WTLExcel.aspx #import "c:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLL" #import "c:...

Create Excel files from C# without office

Possible Duplicate: Create Excel (.XLS and .XLSX) file from C# I am writing a program that generates excel reports, currently using the Microsoft.Interop.Excel reference. My dev computer has Excel on it, but the end user may or may not have Office installed. Will this tool fail if Office isn't installed on the end users comp...

Run-time error'9' subscript out of range

The error occurs when I rename the file. I need to be able to the macro automatically recognise the change in the file name and apply it to the macro. Is there any way to do this without having to manually change it each time which will no work for what I need this to do Sub OccurenceSort() ' ' OccurenceSort Macro ' Macro recorded 4/9/2...

VBA Excel macro: use Range to act on a different worksheet

I am very much a beginner when it comes to VBA programming. I have a Macro that hides or shows columns based on the value in one cell: Sub HideColumnsMacro() Range("b8:o8").EntireColumn.Hidden = False v1 = Range("b2").Value + 1 If v1 < 12 Then With Range("b8") Range(.Offset(0,v1), .Offset(0, 12)).EntireColumn.Hidden = True En...

The application called an interface that was marshalled for a different thread

i'm writing a delphi app that communicates with excel. one thing i noticed is that if i call the Save method on the Excel workbook object, it can appear to hang because excel has a dialog box open for the user. i'm using the late binding. i'd like for my app to be able to notice when Save takes several seconds and then take some kind ...

reading excel file in vb.net

can anyone help me on how to know EOF of excel using vb.net? i have this code but it crash when i try delete the proceeding rows from row 6 to downward. my problem is, my code was still reading a null values of rows that i deleted in excel.. this is my code: Dim xlsConn As New OleDbConnection Dim xlsAdapter As New OleDbDataAdapter Di...

Best practice to use MS Excel as a database

In office, it is popular to use MS Excel to store data. In most cases, the data is structured, which means it is suitable for a database. I know peole prefer MS Excel for it is easy to change the data structure and data value. So I have an idea to use MS Excel as a database IF people follow a general rule to store data. In other words, b...

Having problem with decimal points in MS Excel 2007

I want to generate a graph with a large decimal number like -106.63633167743683 or 52.132235169410706. But whenever I'm entering the value in Excel sheet it is giving me value like -106.63633167743600 (as I have formatted cell with 15 decimal places). It is replacing the value of last two digits by 0. Can anyone help regarding this plea...

Using Microsoft.Office.Interop to save created file with C#

I have the this code that will create excel file and work sheet then insert same values. The problem I'm facing that I'm not able to save the file with name giving ten colse it. I used SaveAs but did not work: wb.SaveAs(@"C:\mymytest.xlsx", missing, missing, missing, missing, missing, XlSaveAsAccessMode.xlExclusive, missing, mis...

Convert miliseconds to date (in Excel)

I have a row in excel with the following data: 1271664970687 (I think it's the number of milliseconds from 1970...). I would like to have adition row that will show it as date/time. ...

Is it possible to write a service which will run data through excel document?

I want to create a service which will insert provided data into spreadsheet fields and get results from other spreadsheet fields after they are recalculated and it should support multiple parallel executions. Is this possible at all and maybe somebody can give a link with some tutorial I can begin learning from? ...

Why does VBA Find loop fail when called from Evaluate?

I am having some problems running a find loop inside of a subroutine when the routine is called using the Application.Evaluate or ActiveSheet.Evaluate method. For example, in the code below, I define a subroutine FindSub() which searches the sheet for a string "xxx". The routine CallSub() calls the FindSub() routine using both a standard...

Calling VB.NET code from Excel

I open an Excel workbook from VB.Net and then want an event in the workbook (such as pressing a button) to activate code in VB.Net. How do I accomplish this type of callback? ...

OpenXML SDK: Make Excel recalculate formula

I update some cells of an Excel spreadsheet through the Microsoft Office OpenXML SDK 2.0. Changing the values makes all cells containing formula that depend on the changed cells invalid. However, due to the cached values Excel does not recalculate the formular, even if the user clicks on "Calculate now". What is the best way to invalida...

How do I convert a datatable to Excel sheets in windows forms using c#

Hi, I am working on Windows Forms application , c# I have three datatables. I want to save the first table in Sheet1 of an excel , second table in Sheet2 of the same excel and the third in the Sheet3. The names of these three sheets will remain the same, as Summary,Details and Retailers. Can anyone please let me know how do I do this. ...

Excel Merge() vs MergeCells

Hi, I'm using VSTO, C#, and Excel but VBA probably applies here as well. What's the difference between calling the Merge(missing) method on a range and setting the MergeCells property to true? Does Merge() fail more often? Thanks! ...