C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,838 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi there,
I am a developer that works with a legacy Excel Extension codebase. Now we are populating a few tables using Microsoft.Office.Tools.Excel. Currently I am experiencing a System.NullReferenceException in Microsoft.Office.Tools.Excel.ListObjectAdapter (as shown in the picture below).
private readonly ApplicationFactory factory;
private async Task ProcessSetting(WorkBookListOFvalues item, Stopwatch s, long time, StringBuilder print)
{
ListObject tableLo = null;
DataSet ds = null;
DataTable data = null;
try
{
try
{
globals.Dispatcher.Invoke(() =>
{
tableLo = factory.GetVstoObject(ExcelExtensions.GetListObject(TargettyFormLoadAndSave.Action.applicationSettings.Workbook, item.ListObject));
});
}
catch (Exception e)
{
// Error handling
return;
}
Troubleshooting methods used:
A colleague of mine suggested to check if I am correctly logged into a Visual Studio and Excel (I am). Since the problem seems to be inside a official library I have tried to read documentation with no success so far.
Any help is appreciated.