excel

Different results exporting to CSV or Excel

I have a simple report that I want to export to a CSV file. There is only the detail line that is grouped by one field, no group header, and a group footer for totals. The problem is when I export to CSV format, the total row for a group is listed in front of every record? If I export to Excel and then save as a CSV file, the total ro...

Replacing numbers with hashes in WPF when the text is too large

I'm looking for a simple, idiomatic method of replicating Excel's visual cue that a number is too large to be displayed in a column. I've got the following xaml: <ListView.View> <GridView> <GridViewColumn ... /> </GridView> <ListView.View> and what I'd like is if the text in the column is too small to be displayed (i.e...

Excel 2002 Web Query screwing up en-GB dates

Good afternoon, I have a web query in Excel 2002 going against a web page that returns a date column. The dates are returned as DD/MM/YYYY, as I would like to show them in my spreadsheet. My machine running Excel has its regional settings set to en-GB, and the only language set under Internet Options is UK English. Nevertheless, the ...

Excel web query times out

I have an excel page that runs a series of web queries that call reporting services reports and thencut-n-paste that into powerpoint. from time to time, the query hangs and brings the app to a screeching halt. is there a way to maybe put that into a loop and keep looping until the web query actually brings back some data? ...

Failure to Pass Arguments to a UDF in VBA for Excel 2007

I have a complex iterative spreadsheet in which I want to use a UDF to calculate the heat transfer coefficient of a heat exchanger. The function has 5 arguments (2 strings and 3 doubles). The strings and 1 double pass just fine. The remaining two don't seem to go through at all. A watch on problematic arguments shows them to be equal to ...

Excel 2000 VBA: Errors Raised within Class Debug As If Raised at Property Call

I am (unfortunately) developing an application in Excel 2000 VBA. I believe I have discovered that any error raised within a Custom Class property, function, or sub debugs as if the error were raised at the point in the VBA code where the property is called. That is, the VBE debugger does not take me to the point in the Class property ...

CSV for Excel, Including Both Leading Zeros and Commas

I want to generate a CSV file for user to use Excel to open it. If I want to escape the comma in values, I can write it as "640,480". If I want to keep the leading zeros, I can use ="001234". But if I want to keep both comma and leading zeros in the value, writing as ="001,002" will be splitted as two columns. It seems no solution to...

Crystal Reports exporting to Excel Issue

In a current C# application I do maintenance on, we have upgraded to Visual Studio 2008 from Visual Studio 2003. We have always used the included Crystal Reports that came with Visual Studio. Since the upgrade we have found an issue with our reports when exporting to excel. If the column in the details section is null, then all the res...

Open a Specified File in Excel from a GUI - Borland C++

I am using Borland Builder C++ 2009. I want to add a button to a form that allows the user to open a file in Excel that I specify. I can't think of how to do this. I know how to link with other code and executables -- is there a Microsoft Excel executable that I could use? How could I specify the file then? Any hints on this, or at least...

Tricks for generating SQL statements in Excel

Do you have any tricks for generating SQL statements, mainly INSERTs, in Excel for various data import scenarios? I'm really getting tired of writing formulas with like ="INSERT INTO Table (ID, Name) VALUES (" & C2 & ", '" & D2 & "')" ...

C# Technique - Getting Constant Values By String

Is there any good way to convert strings like "xlSum", "xlAverage", and "xlCount" into the value they have under Microsoft.Office.Interop.Excel.XlConsolidationFunction? I guess reflection would be slow (if its possible). There are about 10 of these constant values. I was trying to avoid a large switch statement if possible. ...

Trying to improve efficiency of array formula

I have a SUM array formula that has multiple nested IF statements, making it very inefficient. My formula spans over 500 rows, but here is a simple version of it: {=SUM(IF(IF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17>0, IF(A1:A5>A7:A11,A1:A5,A7:A11)-A13:A17,0))} As you can see, the first half of the formula checks where the array is greater t...

Sql Import wizard imports 1022868890 as 1.02287e+009

I'm trying to import some data from Excel to SQL Server, I have a TEXT column with some numbers in it, some of the numbers go over just fine, and some turn into scientific form. Column in Excel is "text" type, column in the target sql table is varchar(255) Here are some examples: Excel [text] -> SQL Server [varchar(255)] 03138522...

Paste MS Excel data to SQL Server

I have a bunch of rows in Excel that I want to paste into a new table in MS SQL. Is there a simple way ? ...

How to sum data in one column based on the same month in another column using macros

Hello I am Tifu, I am using macros in excel 2007 for my work. I am working with many data and I need to sum data from 2 or more rows in the same coloumn according to the same month. However the month column is expressed as date. for example, i have series of data A B 2/10/2008 2 2/10/2008 3 4/10/2008 3 5/11/2008 ...

How to get color combination compatible to both Excel and SSRS

Hi, Can any one let me know How to get color combination compatible to both Excel and SSRS Thanks in advance ...

vba problem using case to colour range based on number in cell

hi using macro i have consolidated info from several wbooks into on sheet in new book. in one column i have created a named range called ColRange i have numbers ranging from -350 to 500 in this column I can't seem to write the vba to color these cells red(0-500) yellow(-5-0)and green(-350--5) any help would be appreciated thanks ...

xls to text converter

Anyone know of a free xls to text converter that can be run from the unix command line? ...

Killing an interop Application process

I have the following in a program (written in VB.NET): Imports Microsoft.Office.Interop.Excel Public Class Form1 Dim eApp As New Excel.Application Dim w As Excel.Workbook w = eApp.Workbooks.Open( "path.xls", ReadOnly:=True) .. Processing Code .. //Attempts at killing the excel application w.Close() eApp.Work...

How to fill DataTable from an in-memory Excel Worksheet

Our client gets Excel files in Excel's HTML format.(That's the way it arrives; nobody has any control over that.) We then need to run a report based on the data in the file. Using ADO.NET (OleDbReader) results in a "External file not in expected format" exception. If the data is converted to regular Excel format it gets read in OK. Howe...