473,388 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

How do you use a .NET Enum through Excel Automation Add-In UDFs ?

Hi there

I have a C# class that I have loaded as an Automation Add-In for
Excel. The functions work absolutely fine in Excel but there is an
interesting problem when one of the parameters is an Enum which I hope
that someone here will be able to explain to me:

1) If I input the number corresponding to the Enum parameter (e.g. 0)
I want to use into the function parameter it works as expected
2) If I type the name/string of the Enum parameter I want to use again
it works but it always assumes the Enum parameter is 0
3) If I reference a cell with either the name or number of the Enum
parameter I get a #VALUE! error

So, does anybody know why this happens? And even better can anybody
tell me what I need to add to my code so that the user can write the
name of the Enum parameter or a reference to a cell with it directly
into the function parameter and have the UDF work?

Many Thanks
Lloyd

Oct 26 '07 #1
0 966

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dlakme | last post by:
Hi, I tried to add column headers and delete all rows to excel database which is a linked server to my sql server db. I got an error message, "delete data through linked server is not...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
1
by: Robinho | last post by:
Hi...i'm working on VB and I want open just Cells from excel, make a few operations, and save it like "work.xls" I don't want open excel, just see and work on cells predeterminates by me... ...
4
by: goonsquad | last post by:
I'm writing an Excel Automation app and I'm running to a problem early on with what should be a basic step. Dim oExcel As Object Dim oBook As Object Dim oSheet As Object Dim oRng As...
3
by: Mike | last post by:
Hello, I am attempting to export the contents of a datagrid on my webform (using Excel automation) through ASP.NET. I have added the Excel object library to my VS ASP.NET project but I am...
3
by: Gultekin Komanli | last post by:
Hi all, I'm new to .NET stuff and trying find a way to do automation with Excel, using VB 2005 EE. I searched this forum, there are samples that use some namespaces for office automation but...
0
by: mward | last post by:
I just upgraded my Office 2003 to SP2 and am having problems with my Excel automation code from C#. The version of Excel.exe that I'm now using is 11.0.8033.0. It appears as though the object...
3
by: Tim Marsden | last post by:
Hi, I am currently creating an instance of Excel using VB.NET Automation. dim xl as Excel.Application xl = new Excel.Application However, how can I have more control over the starting of...
18
by: John Bailo | last post by:
I want to write an Excel file (.xls format) from some database data. I don't want to use Excel.exe because of all the automation and security issues. Does Microsoft document the .xls file...
4
by: Keith Wilby | last post by:
How controllable from Access VBA is Excel? I'm currently using automation to dump 2 columns of data into an Excel spreadsheet so that the end user can create a line graph based on it. Could the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.