diff --git a/src/client/spark_excel/utils/Generate.cs b/src/client/spark_excel/utils/Generate.cs index 28e9ad95a..fa3adcab1 100644 --- a/src/client/spark_excel/utils/Generate.cs +++ b/src/client/spark_excel/utils/Generate.cs @@ -4,6 +4,7 @@ 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; @@ -16,8 +17,12 @@ namespace bts.excel static ConcurrentDictionary _cache = new ConcurrentDictionary(); [ExcelFunction(IsMacroType = true)] - static public void bts_generate_code_from_sink(string name, [ExcelArgument(AllowReference=true)] object sink) + 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(); } }