excel

How to prevent ADO.NET from altering double values when it reads from Excel files

I have the following rows in my Excel input file: Column1 Column2 0-5 3.040 6 2.957 7 2.876 and the following code which uses ADO.NET to read it: string fileName = "input.xls"; var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8...

Issue encoding java->xls

This is not a pure java question and can also be related to HTML I've written a java servlet that queries a database table and shows the result as a html table. The user can also ask to receive the result as an Excel sheet. Im creating the Excel sheet by printing the same html table, but with the content-type of "application/vnd.ms-exce...

win32com equivalent of xlrd's sheet.ncols

xlrd makes it pretty easy to know what the last column is. is there an easy way using win32com? I have tried using ws.UsedRange.Rows.Count but this doesnt seem to give a correct answer. ...

"interface not found" in WCF Moniker without registration for excel

I'm trying to connect excel to a WCF service, but I can't seem to get even a trivial case to work... I get an Invalid Syntax error when I try and create the proxy in excel. I've attached the visual studio debugger to excel, and get that the real error is "interface not found". I know the service works because the test client created by...

What is an alternative to ADO.NET, but elegant way in C# to read Excel files

ADO.NET just fails miserably when it's used to read Excel files where a column contains mixed data types. It appears that it tries to determine the data type of a column, and then assume the rest of the entire column is of the same data type. Here are some backgrounds: http://stackoverflow.com/questions/2968111/how-to-prevent-ado-net-...

Overcome VBA InputBox Character Limit

Hi, The current function I use to collect text InputBox can't accept more than 255 characters apparently, and I need to be able to collect more than that? Is there a parameter or different function I can use to increase this limit? ...

Excel Automation Addin UDFs not accesible

I created the following automation addin: namespace AutomationAddin { [Guid("6652EC43-B48C-428a-A32A-5F2E89B9F305")] [ClassInterface(ClassInterfaceType.AutoDual)] [ComVisible(true)] public class MyFunctions { public MyFunctions() { } #region UDFs public string ToUpperCase(str...

Can VBA Reach Across Instances of Excel?

Can an Excel VBA macro, running in one instance of Excel, access the workbooks of another running instance of Excel? For example, I would like to create a list of all workbooks that are open in any running instance of Excel. ...

Loading Large Excel Files

I'm using the OLEDB connection string for this and it appears that whenever I try to load an Excel file (I'm using .NET) it takes an incredibly loooong time. This causes a timeout and most files greater than a certain size can't be loaded into the program. Is there any other way or pattern I can use to make everything work faster (The d...

Modify/Read/Write existing Excel/PDF document with .NET libraries

Hi, guys. The issue consists of two parts: What are the best .NET libraries to modify (read/write) existing excel document (should be work with Excel 2003)? What are the best .NET libraries to modify (read/write) existing pdf document? They should be able to create new document too. It's better if they are free (open source) or not...

Excel Time format data getting converted to text value in XML

Hi, Thanks for viewing my question. This is basicaly excel I am working on **Shift Start Time Break 1 Time Lunch Time Break 2 Time Shift End Time** 7:00:00 8:30:00 12:00:00 14:30:00 16:30:00 when I am convertiong this excel to XML from my .Net code the time values in Xcl are getting conver...

Excel, copy and paste column data based on date specified

Cell C1 contains a date.Macro to check the date in C1, if the same date is mentioned in row 3 then copy all matching date data beneath it from D6 downwards, paste to sheet2, cell b3.Also copy a6 column downwards to sheet2, cell a3. ...

How to change the title bar text of a Userform in VBA?

I'm maintaining an old-ish application written in VBA for Excel 2002 (XP)/2003, and am trying to internationalise it. To do this, I read in the translated strings dynamically and update the various controls on my userform by updating their .Caption property. This works as expected for all controls but not for the form itself -- when I ...

EXCEL VBA help - function to insert blank cell

Hi, I need some help with an excel VBA function. I have data that looks like this ColA ColB a123 a123 a124 a124 a127 a126 a128 a127 .... .... I want to compare the contents of ColA and ColB, Where the contents are different I want to insert a blank cell into column A. So the result wi...

HTML to EXCEL -> simple question

O have a ,,export to excel" function, I have some tables and it works fine, but I have one single problem. For moving to the next line I use <br />, but what if I want to switch to the next column? What tag can I use to switch to the next column? Thanks ...

ExecuteExcel4Macro on custom xll functions

I have a C++ .xll addIn for Excel. The following test worksheet function works fine with the xll loaded: LPXLOPER __stdcall Test() { return &xlstring("Yayage",true) } i.e. =Test() returns "Yayage" in the worksheet. xlstring is my own custom method which turns a string into an excel string and specifies whether excel or the xll are...

Worksheets(ws.Name).Range("A" & i & ":G" & i).Copy _ Destination:=Worksheets("Sheet1").Range("A" & emptyCell)

I have this Excel VB code, and everytime after it executes this line, it pauses for half a second: Worksheets(ws.Name).Range("A" & i & ":G" & i).Copy _ Destination:=Worksheets("Sheet1").Range("A" & emptyCell) Can someone tell me what it is doing, and how I can prevent it from taking so long? I have Microsoft Excel 2007 on Windows XP ...

Working with multiple excel workbooks in python

Using win32com, I have two workbooks open. How do you know which one is active? How do you change which one is active? How can you close one and not the other? (not Application.Quit()) ...

Creating a border around cells with the same value.

I have a table like the one below. How can I get Excel to put borders around groups with the same number in the 4th column so that there is a border around the groups. I was thinking conditional formatting could do it but I can't think how. So I think the only option is a macro. Could anybody help? 1 64436 549419 1 2 64437 549420 1 ...

How to Lookup For something main VBA

Hi, I wanna know how to Lookup For many number in a column A corresponding to a name in Column B By coding in VBA..And Write it in column C??? Thanks in advance..Im new in this... Exemple A B C 200-333 Jack 200-345 Lea 200-346 Fresh 200-347 Tide ...