excel

PHP:Writing to excel file using PEAR

I have installed PEAR, Spreadsheet_Excel_Writer and OLE. The sample program is executed successfully but when I try to read the file it shows garbage values. I also tried $workbook->setVersion(8); and $worksheet->setInputEncoding('UTF-8'); I am using this tutorial and Google lot for this problem. http://www.sitepoint.com/article/gettin...

Is it possible to detect if Microsoft Excel is installed from a Web Application

I'm working on a web app (ASP.NET) that has some features that require Microsoft Excel installed on the client. I'd like to disable those features if Excel is not present. Windows/IE/Excel only solutions are fine. This is not a multi-browser, multi-OS web app. Any clever JavaScript out there to accomplish this? ...

Interpreting Excel Currency Values

I am using python to read a currency value from excel. The returned from the range.Value method is a tuple that I don't know how to parse. For example, the cell appears as $548,982, but in python the value is returned as (1, 1194857614). How can I get the numerical amount from excel or how can I convert this tuple value into the numeri...

How do you typically import data from a spreadsheet to multiple database columns?

For whatever reason, I have a lot of clients that have existing data that's stored in spreadsheets. Often there are hundreds, if not thousands of items in each spreadsheet, and asking the client to manually enter them through a website (or heaven forbid importing them that way myself) is out of the question. Typically, this data doesn't ...

Exporting Excel cell data to database via Excel macro?

Can I create a macro written in C# for Excel that allows me to export a cell's data to a SQL Server or Access database? Basically, I'd like to create a button in Excel that saves the data in certain cells to a database. Can this be done? Instead of creating a UI from scratch for a program, I've decided using Excel as the user environm...

In Excel automation, how to gracefully handle invalid file format error upon file opening?

I'm trying to open a Microsoft Excel file in a C# program using the 'excelApp.Workbooks.Open()' method. As it happens, if the format of the file is invalid, this method causes an error message box to be displayed. I, however, don't want that; I wish to handle this error gracefully in my own code. My question is, how do I do that? The ...

refresh and save excel file via c#

I use this code to open refresh save and close excel file: Application excelFile = new Application(); Workbook theWorkbook = excelFile.Workbooks._Open(Environment.CurrentDirectory + "/WebGate", 0, false, 5, System.Reflection.Missing.Value, System.Reflection.Missing.Value, false, System.Reflection.Missing.Value, System.Reflec...

Disabling or overriding the excel and pdf export function in Reporting Services

Is there a way to disable or override the excel and pdf export function in SQL Server Reporting Services. I want to my own custom excel export. ...

Does DDE still matter? Which are the alternatives?

I'm working on a stock exchange information platform and we are thinking in provide a link between our platform and home-made Excel files. The financial market is still bound to the old DDE server approach, now does it still matter today? Which are the alternatives to make automatic online data updates on Excel files, OLE DB queries? I ...

McAfee deletes code from VBA module

I am trying to program an Excel module where it dynamically inserts code in new objects in a form that is created at design time. I am using this code where "Code" contains a string with the actual code that should go into the DstrFiles object. Dim DstrFiles As Object Set DstrFiles = ThisWorkbook.VBProject.VBComponents("DistributeFile...

How to get Google page rank and number of searches in Excel sheet?

I have a link in one column and based on it I want Number of Google searches in column 2 Page rank of first result in column 3 I know this can be done, as i saw a friend pulling google search result right in Excel. If anyone knows, please share how I could do that. Regards, Thinkjayant ...

sending commands to an application from Excel? COM?

I wrote a device controller (rs232) and it is being used successfully, however users want to view data and control the device (or perhaps communicate through my program) from Excel. I dismissed DDE as an option and found that RTD (IRtdServer) is probably a good start (though no way to send data back to the "server" from the real time da...

How to stop renaming of excelsheets after running the save macro

Below is a macro to save multiple sheets to different csv files BUT it keeps renaming and saving the original workbook, how to stop this. Private Sub CommandButton1_Click() Dim WS As Excel.Worksheet Dim SaveToDirectory As String Dim CurrentWorkbook As String Dim CurrentFormat As Long Dim myName As String myName = myName & Application....

Create an Excel macro which searches a heading and copy-paste the column

I am new to Excel macros. I have some columns with headings scattered in many sheets. I would like to type a heading in some column which has the cursor and have the column with that heading copy-pasted to the column with the cursor. Is it possible to do this by recording a macro? How? If not, how do I do it programmatically? ...

Quitting Excel using VBA causes run-time error 424

I have been writing a VBA macro that opens a HTML document within Excel (in order to perform various calculations on it). Excel will search for the HTML document within the current folder. If it can't find it there it will produce a file open box where the user can browse to the location of the HTML document manually. All good so far....

How to use Office from Visual Studio C#?

The technique for adding a reference to the COM interop of Office in Visual Studio is to go to: References Add Reference Select the COM tab Select Microsoft Office 11.0 Object Library And magically named reference appears: Microsoft.Office.Core The Project.csproj file shows the details of the reference: <COMReference Include="Mic...

Access Excel workbook from javascript

Is there a way to access an Excel worksheet using javascript? ...

What is a good up-to-date book for an experienced developer to learn Excel VBA?

I am an experienced developer notably in C#. I need to help a non-programmer friend get thigns done with Excel VBA. What is a good book for me to quickly pick Excel Macros & VBA up so that I can help my friend? We're using Excel 2007. ...

automatically execute an Excel macro on a cell change

How can I automatically execute an Excel macro each time a value in a particular cell changes? Right now, my working code is: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("H5")) Is Nothing Then Macro End Sub where "H5" is the particular cell being monitored and Macro is the name of the macro....

Import from ADO.NET Data Services into Excel

I'm playing around with ADO.NET Data Services and would like to import the output from a query into a spreadsheet. Although Excel 2007 allows me to import the results of a request from the web page, the resulting spreadsheet contains all the XML header info which makes seeing/working with the data impossible for my users. Can't seem to...