excel

Date format that is guaranteed to be recognized by Excel

Hello, We're exporting our analytics reports in various formats, among them CSV. For some clients this CSV finds it's way into Excel. Inside the CSV file one of the columns is a Date, for example "Start Date","Name" "07-04-2010", "Maxim" Excel has trouble parsing this date format, obviously depending on the Locale of the user. Is "...

Excel Question: I need a date and time formula to convert between time zones

Hello, I am trying to find a way to calculate a duration in days between my, time zone (Central), and (Pacific; Mountain; Eastern). Just do not know where to start. My criteria would be as follows: Cell C5:C100 would be the timestamps in this format:3/18/2010 23:45 but for different dates and times. Cell D5:D100 would be the correspo...

Automation Error when exporting Excel data to SQL Server

I'm getting an Automation error upon running VBA code in Excel 2007. I'm attempting to connect to a remote SQL Server DB and load data to from Excel to SQL Server. The error I get is, "Run-time error '-2147217843(80040e4d)': Automation error". I checked out the MSDN site and it suggested that this may be due to a bug associated with ...

Excel 2003 - How to build my own XLA?

How can you make the .xla file if you want to create your own xla? I have the code, classes, shapes, etc....what is the process to making an xla file to point to? I know that I have to put it in my program files folder, and then go through the steps to adding an "add-in" in xls...but i mean actually saving an xla file to point to.... ca...

Is it possible to copy a macro from one Excel workbook to another using VBA?

I would like to copy a macro from one Excel workbook to another using VBA. Is this possible? If so, how? ...

XML File as Excel file.

I have a number of reports that I run against my database that need to eventually go to the end-users as Excel spreadsheets. Initially, I was creating text reports, but the steps to convert the text to a spreadsheet were a bit cumbersome. There were too many steps to import text to the spreadsheet, and multi-line text rows were imported...

Strategy in exporting to Excel with formatting from ASP.NET?

So this is another exporting to Excel question. I have a page that has a table with formatting by stylesheet. When I export the page by setting the ContentType to application/excel and Content-Disposition to attachment, I can export the table to Excel (not CSV). However, it loses all formatting. I think it's because Excel does not loa...

Can an Excel VBA UDF called from the worksheet ever be passed an instance of any Excel VBA object model class other than 'Range'?

I'm 99% sure that the answer is "no", but I'm wondering if someone who is 100% sure can say so. Consider a VBA UDF: Public Function f(x) End Function When you call this from the worksheet, 'x' will be a number, string, boolean, error, array, or object of type 'Range'. Can it ever be, say, an instance of 'Chart', 'ListObject', or any...

PHPExcel set specific headers for file format

Hi, While googling I found two different sets of headers that need to be set when outputting excel generated in different file format. for e.g. For Type "Excel5" headers are: header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Content-Type: application/force-dow...

excel formula problem

Kindly check the below written formula, if the formula is not correct then please provide me the correct one that is related to this. IF(A1:AV7000=F1,vlookup(f2,B1:C7000,2,0),0) As I have tried above written formulas, but it's not working. ...

Replace or recode several different values by a single value in an Excel file

Hi all, I have an Excel worksheet which contains data in several columns. For a specific column, I will need Excel to replace all values between, say 10 to 15, by the value 1 and values between 16 and 20 by the value 2 and so forth. I know how to do it for a single value; ie: I can replace value 10 by 1, 11 by 1 and so on. But this wil...

Export data as Excel file from ASP.NET

Hi all I have data like below AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE Now there is button on the page,when I click the button, the browser would download a excel file with the data above, and stay current page. Is there any simple way to do it? The data is very simple. only one column, and not huge. Best Regards, ...

Using VSTO in a standalone application to access Excel sheets

Dear all, tried to research on that but sometimes I seem to lack some googling skills... I want to develop a (standalone) WinForms application which uses automation for communicating with Excel. I already know how to use the Interop, but I thought the VSTO tools would provide a more comfortable or sophisticated way to do that. My idea...

How to test to see if a computer has Excel installed (any version)?

I have a windows form application that when it starts needs to see if the user has Excel installed on the computer and if not display a message informing user that part of functionality will be disabled. Is their an easy way to perform this check? Working in Visual Studio 2008 with VB.Net ...

Set Margins In Excel Using Excel Interop VB.Net

Anyone have code to set margins(top,left,right,bottom) using excel interop and vb.net. I think it must be part of the worksheet object but maybe the workbook object. Having a tough time finding an example. Thanks in advance. ...

Number Formatting in excel Vb.Net

Can someone give me some code to set the cell of an excel spreadsheet to a number format that use a max of 2 decimal places. Or would it work better it I change the data I am putting into the cell to a proper format? Here is a sample of data that is going in. Right now its going in as a string... col("ADJ").ToString() where col is a Data...

VSTO Alternatives

What alternatives exist for VSTO? What does managedxll do that VSTO does not - When would you use one vs the other Google does not bring much up on this subject This is more of an interview question - What are the pros and cons and both is the crux of the question here ...

Excel Interop's get_printquality method - what the heck?

I'm using C# and the Office 2007 Excel Interop library. I'm needing to adjust the print quality of every page on each worksheet in an Excel file using the Interop API. The following is my current code for doing this. This is happening within a foreach loop over every Worksheet in the Workbook. // Attempt to force the printer to...

How to save output in excel

Hi, how to save output in excel format rather than in .txt file? ...

How do I programmatically create Excel row groups with the +/- box at the top of the group, not bottom

I am creating an Excel sheet programmatically. I like to show group totals above each group, and for this to look best the +/- sign that opens and closes the rows should be at the top, where the total row is. Is there a way to accomplish this? TIA, Alex ...