如何在 Invantive Excel 加载项中包含对 table 的引用

How to Include a reference to a table in Invantive Excel add-in

我正在使用 Invantive Control Excel 加载项使用 Exact Online 中的数据在 Excel 中制作财务报告。在 Exact Online 中,我对总帐进行了分类。在我的 Excel 文件中,我想在我的报告计划中匹配这些分类。因此,我制作了一个 table,其中包含 Exact Online 分类和报告分类的映射。 使用 Invantive Control Excel 加载项,我输入了以下 SQL 查询:

    select periods_year_reportingyear_attr
,      reportingperiod_attr
,      division_code
,      division_hid
,      division_name
,      periods_year_years_balance_code_attr
,      periods_year_years_balance_description
,      '=I_EOL_GL_ACTCLN_CODE($C{E,.,.,^+2,.}, $C{E,.,.,^+5,.})' verdichting_code
,      '=I_EOL_GL_ACTCLN_DESCRIPTION($C{E,.,.,^+2,.}, $C{E,.,.,^+5,.})' verdichting_naam
,      '=i_eol_bal_year_open($C{E,.,.,^+2,.} , $C{E,.,.,^,.}, $C{E,.,.,^+5,.}) + if($C{E,.,.,^+1,.} = 1, 0, i_eol_bal_pder($C{E,.,.,^+2,.},$C{E,.,.,^,.},1,$C{E,.,.,^+1,.}-1,$C{E,.,.,^+5,.}))' startsaldo
,      balance
,      '=i_eol_bal_year_open($C{E,.,.,^+2,.} , $C{E,.,.,^,.}, $C{E,.,.,^+5,.}) + i_eol_bal_pder($C{E,.,.,^+2,.},$C{E,.,.,^,.},1,$C{E,.,.,^+1,.},$C{E,.,.,^+5,.})' eindsaldo
,      periods_year_years_balance_balancetype_attr
,      '=INDEX(tab_reporting[Reporting],MATCH(NUMBERVALUE(I_EOL_GL_ACTCLN_CODE($C{E,.,.,^+2,.}, $C{E,.,.,^+5,.})),tab_reporting[GL Class - Code],0))' reporting
from   balancelinesperperiod 
order 
by     periods_year_reportingyear_attr
,      reportingperiod_attr
,      division_hid
,      periods_year_years_balance_code_attr

其中tab_reporting是一个table的名称,带有报表分类和Exact Online的去映射。此 table 在 Excel 中的不同选项卡上。当我查看数据时,我会看到以下结果: 哪个,对我来说看起来不错。

我不明白的一件事是,位置 14 上似乎有 4 个字段。一个公式似乎创建了 4 个不同的数据字段,而不是一个。

我可以根据要求发送 Excel 文件。 问题是我最终收到此错误消息:

itgensdf031: Kan velden van blok 'Balans (bal)' niet verversen. Can not refresh fields completely. The field '});TAB_REPORTING[GL CLASS - CODE];0))'' has a Formule which will get lost when the field is deleted since it no longer occurs in the SQL.

Migrate all relevant field settings that you need to keep and would get lost when this field is removed. Hire a consultant if you don't know how to do this.

Type: Invantive.Data.ValidationException at Invantive.Data.ValidationException..ctor(String messageCode, String messageText, String kindRequest, String localStackTrace, String nk, Exception innerException) at Invantive.Producer.Control.Utility.RefreshFields(ModelCache modelCache, iea_blocks_v block, Boolean allowLoadFromCache) at Invantive.Producer.Control.SyncToDatabaseForm.syncBackGroundWorker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() at Invantive.Producer.Control.Utility.RefreshFields(ModelCache modelCache, iea_blocks_v block, Boolean allowLoadFromCache) in File173:line 4362 at Invantive.Producer.Control.SyncToDatabaseForm.syncBackGroundWorker_DoWork(Object sender, DoWorkEventArgs e) in File174:line 299 Type: Invantive.Data.ValidationException at Invantive.Data.ValidationException..ctor(String messageCode, String messageText, String kindRequest, String localStackTrace, String nk, Exception innerException) at Invantive.Producer.Control.SyncToDatabaseForm.syncBackGroundWorker_DoWork(Object sender, DoWorkEventArgs e) at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument) at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) at System.Runtime.Remoting.Proxies.AgileAsyncWorkerItem.ThreadPoolCallBack(Object o) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Invantive Control for Excel (stable-20161021-2025-ge3e5e61 Prod, L162135034)

看来您是通过某处的错误设法在位置 14 处创建了多个字段。这是存储库的损坏。

我建议首先删除位置 14 的字段:

  • 取消选中它们的属性
  • 从 SQL 中删除定义位置 14 字段的部分(将其保存在某处),
  • 然后在字段选项卡中按刷新。

检查第 14 位的字段是否消失。

重新添加 SQL 中定义位置 14 字段的部分。

它应该又能用了。