Files
spark/src/client/spark_excel/utils/Generate.cs
T
2019-07-04 23:43:22 -04:00

29 lines
862 B
C#

using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Reflection;
using System.Text.RegularExpressions;
using ExcelDna.Integration;
using ExcelDna;
using bts.api;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace bts.excel
{
public class Generate
{
static ConcurrentDictionary<string, object> _cache = new ConcurrentDictionary<string, object>();
[ExcelFunction(IsMacroType = true)]
static public string bts_generate_code_from_sink(string name, [ExcelArgument(AllowReference=true)] object sink)
{
ExcelReference rref = (ExcelReference)sink;
var form = XlCall.Excel(XlCall.xlfGetCell, 41, rref);
//var formabs = XlCall.Excel(XlCall.xlfFormulaConvert, form, ExcelDna.
return form.ToString();
}
}
}