Hi,
I'm developing an Excel Automation add-in in C#, but that's all I know
in terms of my environment. Basically, someone created a template for
me and I'm continuing in blissful ignorance. Everything works though.
Now I want to have a function that returns different types. So I have a
function like this:
public Object mytest(int i) {
if (i == 1)
return new DateTime(2006, 9, 29);
else if (i == 2)
return 8;
else if (i == 3)
return "Hello";
else
return null;
}
Two questions:
1. How can I make it, so that when the date is returned it is formatted
like a date? Can I "suggest" a format?
2. How can I return a value that will result in as empty-a-cell as
possible? Is there something better than returning ""?
Many thanks in advance!!!
Aaron Fude