Code:
using System;Article:
using System.Collections.Generic;
using System.Text;
using Microsoft.Office.Excel.Server.Udf;
namespace ExcelSamples
{
[UdfClass]
public class MyFirstUDF
{
[UdfMethod]
public Int32 RandomNo()
{
Random r = new Random();
return (Int32)((r.NextDouble()*5)+1);
}
}
}
http://msdn.microsoft.com/en-us/library/bb428649.aspx
http://www.wrox.com/WileyCDA/Section/Excel-Services-User-Defined-Functions-UDFs-.id-305100.html
0 comments:
Post a Comment