<?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 GoExcel issues after Excel upgrade (&amp;quot;MyFile.xlsx is already open.&amp;quot;) in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858063#M117907</link>
    <description>&lt;P&gt;"OriginalGetComponentPath" is my old code, which worked fine until my Excel was upgraded (from 2010 to 2016).&lt;/P&gt;&lt;P&gt;I created "TestGetComponentPath" recently for troubleshooting.&lt;/P&gt;&lt;P&gt;Both functions bring up a prompt saying &lt;EM&gt;"MyFile.xlsx is already open. Reopening will cause any changes you made to be discarded. Do you want to reopen MyFile.xlsx?"&lt;/EM&gt; at the&amp;nbsp;&lt;U&gt;GoExcel.Cellvalue row&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an issue with the code, or is it the new Excel installation?&lt;/P&gt;&lt;P&gt;Help is greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Class Runme
	Sub Main
		Dim ComponentName As String = ""
		ComponentName = OriginalGetComponentPath("MyComponent")
		ComponentName = TestGetComponentPath("MyComponent")
	End Sub


	Public Function OriginalGetComponentPath(Denomination As String) As String
		Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
		Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" &amp;amp; RefRow)
		Return ComponentPath
	End Function
	
	Public Function TestGetComponentPath(Denomination As String) As String
		GoExcel.Close
		MessageBox.Show("1", "Title")
		Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
		
		MessageBox.Show("2", "Title")
		GoExcel.Close
		Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" &amp;amp; RefRow)
		
		MessageBox.Show("3", "Title")
		GoExcel.Close
		
		MessageBox.Show("4", "Title")
		Return ComponentPath
	End Function
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;123&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2020 08:56:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-10T08:56:42Z</dc:date>
    <item>
      <title>GoExcel issues after Excel upgrade ("MyFile.xlsx is already open.")</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858063#M117907</link>
      <description>&lt;P&gt;"OriginalGetComponentPath" is my old code, which worked fine until my Excel was upgraded (from 2010 to 2016).&lt;/P&gt;&lt;P&gt;I created "TestGetComponentPath" recently for troubleshooting.&lt;/P&gt;&lt;P&gt;Both functions bring up a prompt saying &lt;EM&gt;"MyFile.xlsx is already open. Reopening will cause any changes you made to be discarded. Do you want to reopen MyFile.xlsx?"&lt;/EM&gt; at the&amp;nbsp;&lt;U&gt;GoExcel.Cellvalue row&lt;/U&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an issue with the code, or is it the new Excel installation?&lt;/P&gt;&lt;P&gt;Help is greatly appreciated!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Class Runme
	Sub Main
		Dim ComponentName As String = ""
		ComponentName = OriginalGetComponentPath("MyComponent")
		ComponentName = TestGetComponentPath("MyComponent")
	End Sub


	Public Function OriginalGetComponentPath(Denomination As String) As String
		Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
		Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" &amp;amp; RefRow)
		Return ComponentPath
	End Function
	
	Public Function TestGetComponentPath(Denomination As String) As String
		GoExcel.Close
		MessageBox.Show("1", "Title")
		Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", Denomination)
		
		MessageBox.Show("2", "Title")
		GoExcel.Close
		Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" &amp;amp; RefRow)
		
		MessageBox.Show("3", "Title")
		GoExcel.Close
		
		MessageBox.Show("4", "Title")
		Return ComponentPath
	End Function
End Class&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;123&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 08:56:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858063#M117907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T08:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: GoExcel issues after Excel upgrade ("MyFile.xlsx is already open.")</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858260#M117915</link>
      <description>&lt;P&gt;I asked a colleague who's still using Excel 2010 to run following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;		Dim RefRow = GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", "MyComponent")
		Dim ComponentPath = GoExcel.CellValue("3rd Party:ConfiguratorParameters", "FileReferences", "D" &amp;amp; RefRow)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It works fine for him, but I get the error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it seems to be an issue with the Excel 2016 installation/integration. Does anyone have any idea what to do?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;Apparently, even following code throws the same error. It seems impossible.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;GoExcel.Close
GoExcel.Open("3rd Party:ConfiguratorParameters", "FileReferences")
Dim g = GoExcel.CellValue("D1")
GoExcel.Close&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 10:55:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858260#M117915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T10:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: GoExcel issues after Excel upgrade ("MyFile.xlsx is already open.")</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858377#M117919</link>
      <description>&lt;P&gt;Ok, so following code (using CurrentRowValue instead of CellValue) works:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;GoExcel.FindRow("3rd Party:ConfiguratorParameters", "FileReferences", "Description", "=", "MyComponent")
Dim g = GoExcel.CurrentRowValue("ColumnName")
Logger.Info("Result: " &amp;amp; g)
GoExcel.Close&lt;/LI-CODE&gt;&lt;P&gt;I'd still like to know why the previous code doesn't, if anyone knows.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 11:32:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858377#M117919</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T11:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: GoExcel issues after Excel upgrade ("MyFile.xlsx is already open.")</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858525#M117925</link>
      <description>&lt;P&gt;I have had a similar issue,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run your code and see if you have some background excels open in your task manager&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if so toss this at the end of your rule&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;GoExcel&lt;/SPAN&gt;.&lt;SPAN&gt;Close&lt;/SPAN&gt;  &lt;/PRE&gt;&lt;P&gt;It wont close your open excels you are working with, just closes the background processes that inventor created during the code running&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;edit, sorry didnt see that you already tried that. I had a bunch of background excel running after my code ran and it was causing problems. but it fixed it for me&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 13:00:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/goexcel-issues-after-excel-upgrade-quot-myfile-xlsx-is-already/m-p/9858525#M117925</guid>
      <dc:creator>AMN3161</dc:creator>
      <dc:date>2020-11-10T13:00:58Z</dc:date>
    </item>
  </channel>
</rss>

