<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354725#M10764</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I developed an AddIn in C# and ArcGIS-Pro 3.1.2, where a table object gets exported to an excel file via the geoprocessing tool "conversion.TableToExcel".&amp;nbsp;Afterwards I need to add some additional columns to the excel file. On the client there is no Office Interop Excel library available therefor I tried to use&lt;BR /&gt;the Open Source tool SpreadsheetLight to edit the exported xslx file. I tested the library in a simple c# Winforms project,&amp;nbsp;where I added the reference to the library via the NuGet manager and in this testproject everything works as expected. But when I added the SpreadsheetLight package to my AddIn project and try to&amp;nbsp;open a xlsx file I get the following error:&lt;/P&gt;&lt;P&gt;"System.TypeLoadException": Could not load type 'DocumentFormat.OpenXml.OpenXmlComparableSimpleReference`1' from assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'&lt;/P&gt;&lt;P&gt;By the way NuGet packet manager installed SpreadsheetLight version 3.5.0 and DocumentFormat.OpenXml version 2.11.3&lt;/P&gt;&lt;P&gt;Any ideas what causes this error? Or is there a configuration/setting in the AddIn project to fix this error?&lt;/P&gt;&lt;P&gt;Thx in advance for your answers&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 17:37:53 GMT</pubDate>
    <dc:creator>AndreasMarth</dc:creator>
    <dc:date>2023-11-29T17:37:53Z</dc:date>
    <item>
      <title>Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354725#M10764</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I developed an AddIn in C# and ArcGIS-Pro 3.1.2, where a table object gets exported to an excel file via the geoprocessing tool "conversion.TableToExcel".&amp;nbsp;Afterwards I need to add some additional columns to the excel file. On the client there is no Office Interop Excel library available therefor I tried to use&lt;BR /&gt;the Open Source tool SpreadsheetLight to edit the exported xslx file. I tested the library in a simple c# Winforms project,&amp;nbsp;where I added the reference to the library via the NuGet manager and in this testproject everything works as expected. But when I added the SpreadsheetLight package to my AddIn project and try to&amp;nbsp;open a xlsx file I get the following error:&lt;/P&gt;&lt;P&gt;"System.TypeLoadException": Could not load type 'DocumentFormat.OpenXml.OpenXmlComparableSimpleReference`1' from assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'&lt;/P&gt;&lt;P&gt;By the way NuGet packet manager installed SpreadsheetLight version 3.5.0 and DocumentFormat.OpenXml version 2.11.3&lt;/P&gt;&lt;P&gt;Any ideas what causes this error? Or is there a configuration/setting in the AddIn project to fix this error?&lt;/P&gt;&lt;P&gt;Thx in advance for your answers&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:37:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354725#M10764</guid>
      <dc:creator>AndreasMarth</dc:creator>
      <dc:date>2023-11-29T17:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354747#M10766</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Both of yours nuget packages doesn't support .NET 6.0.&lt;/P&gt;&lt;P&gt;You can get back from excel to table using "&lt;SPAN&gt;conversion.ExcelToTable", then add fields to table and back to Excel with&amp;nbsp;"conversion.TableToExcel". To add fields you can use geoprocessing too&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/add-fields.htm" target="_blank"&gt;Add Fields (multiple) (Data Management)—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 18:00:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354747#M10766</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-11-29T18:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354785#M10769</link>
      <description>&lt;P&gt;Hi Gintautas,&lt;/P&gt;&lt;P&gt;I have to add fields in Excel with formulas and I have to do some conditional formatting afterwards . And that is - as far as I know - not possible with Geoprocessing tools.&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other side, I can integrate and use the &lt;SPAN&gt;SpreadsheetLight&amp;nbsp;&lt;/SPAN&gt;packages in an standard class library, which uses .NET6.0 as a target framework without any errors. Seems the .NET 6.0 is not the reason for this error.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 19:02:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354785#M10769</guid>
      <dc:creator>AndreasMarth</dc:creator>
      <dc:date>2023-11-29T19:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354787#M10770</link>
      <description>&lt;P&gt;ArcGIS Pro comes with it's own version of DocumentFormat.OpenXml (the 2.0.5022.0 version). If you can find the spreadsheet light version that uses the same version as ArcGIS Pro, it may work, but I haven't tested it. We dropped what we were trying to do and just used the version that comes with ArcGIS Pro.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 19:03:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354787#M10770</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2023-11-29T19:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354806#M10771</link>
      <description>&lt;P&gt;Hi Azharlbrahim,&lt;/P&gt;&lt;DIV class=""&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354725#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;thanks for your response, that was also one of my first ideas what causes this error. Therefor I tried to create a c# class library only with the SpreadsheetLight components inside and use this library for the excel formating. As far as I understand, this additionals class library can not reference the ArcGIS-Pro libraries, but uses the libraries integrated in the Class DLL. Unfortunately this leads to the same error.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354725#" target="_blank" rel="noopener"&gt;PREVIEW&lt;/A&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 29 Nov 2023 19:31:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354806#M10771</guid>
      <dc:creator>AndreasMarth</dc:creator>
      <dc:date>2023-11-29T19:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354812#M10772</link>
      <description>&lt;P&gt;Here's a link to my issue with ClosedXML using DocumentFormat.OpenXml:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/closedxml-in-addin/m-p/1321160" target="_blank"&gt;Solved: ClosedXML in Addin - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Referencing the ArcGIS version of DocumentFormat.OpenXML and not including it anywhere else solved the issue. I did have to drop back several versions of ClosedXml to get it working.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 19:40:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1354812#M10772</guid>
      <dc:creator>AzharIbrahim</dc:creator>
      <dc:date>2023-11-29T19:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Editing Excel files in AddIn with SpreadsheetLight and OpenXml leads to an System.TypeLoadException error</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1355330#M10774</link>
      <description>&lt;P&gt;I think you're right. So unfortunately there is no solution to my problem, because I need a current version of SpreadSheetLight. It looks like there is no way to use components that use a different version of DocumentFormat.OpenXML in ArcGIS Pro than the one ArcGIS Pro implements. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 19:25:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/editing-excel-files-in-addin-with-spreadsheetlight/m-p/1355330#M10774</guid>
      <dc:creator>AndreasMarth</dc:creator>
      <dc:date>2023-11-30T19:25:55Z</dc:date>
    </item>
  </channel>
</rss>

