<?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 Opening an Excel Spreadsheet Using VBA in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231785#M6034</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to open an Excel Spreadsheet in a VBA script; I don't have access to Visual Studio, yet. When I did this before in Arc 9.x &amp;amp; Visual Studio 2005, I would use Process.Start(&amp;lt;spreadsheet path&amp;gt;). Is there a similar command in VBA for ArcGIS 10.0, or do I have to use the VBA Shell function?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2013 18:30:19 GMT</pubDate>
    <dc:creator>BruceNielsen</dc:creator>
    <dc:date>2013-01-25T18:30:19Z</dc:date>
    <item>
      <title>Opening an Excel Spreadsheet Using VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231785#M6034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to open an Excel Spreadsheet in a VBA script; I don't have access to Visual Studio, yet. When I did this before in Arc 9.x &amp;amp; Visual Studio 2005, I would use Process.Start(&amp;lt;spreadsheet path&amp;gt;). Is there a similar command in VBA for ArcGIS 10.0, or do I have to use the VBA Shell function?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 18:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231785#M6034</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-01-25T18:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Opening an Excel Spreadsheet Using VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231786#M6035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bruce,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You use automation to open and drive Excel from ArcMap in VBA, below is some code to get you going:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Create some Excel objects &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim EXCELApplication As Object &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim aWorkBook As Object &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim theSheets As Object &amp;nbsp;&amp;nbsp;&amp;nbsp; Dim aSheet As Object &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ' Start Excel Application and create Workbook &amp;nbsp;&amp;nbsp;&amp;nbsp; Set EXCELApplication = CreateObject("Excel.Application") &amp;nbsp;&amp;nbsp;&amp;nbsp; If EXCELApplication Is Nothing Then &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub &amp;nbsp;&amp;nbsp;&amp;nbsp; End If &amp;nbsp;&amp;nbsp;&amp;nbsp; With EXCELApplication &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Visible = True &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .SheetsInNewWorkbook = 2 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .DisplayStatusBar = True &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .StatusBar = "Please be patient, transfer in progress, Excel will minimise when completed..." &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Workbooks.Add &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set aWorkBook = .Workbooks(1) &amp;nbsp;&amp;nbsp;&amp;nbsp; End With &amp;nbsp;&amp;nbsp;&amp;nbsp; With aWorkBook &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Title = "Sites Downstream of input site" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Subject = "List of downstream sites" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .Comments = "This Excel file contains a list of all sites downstream of the sites in the input layer." &amp;nbsp;&amp;nbsp;&amp;nbsp; End With &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ' Initialise worksheets &amp;nbsp;&amp;nbsp;&amp;nbsp; Set theSheets = aWorkBook.Sheets &amp;nbsp;&amp;nbsp;&amp;nbsp; theSheets.Item(1).Name = "Downstream sites"&amp;nbsp;&amp;nbsp;&amp;nbsp; ' Blah blah blah&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Duncan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Jan 2013 12:53:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231786#M6035</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-01-26T12:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: Opening an Excel Spreadsheet Using VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231787#M6036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Duncan. But what if I want to open an existing spreadsheet?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2013 01:25:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231787#M6036</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2013-01-27T01:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Opening an Excel Spreadsheet Using VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231788#M6037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bruce,You can do this easily you just call the appropriate method on the application object. So the first thing you need to do is search the help file for Excel and you will discover all the functions you need. I don't have them at hand as I am accessing this forum from a tablet...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 Jan 2013 09:59:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231788#M6037</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-01-27T09:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Opening an Excel Spreadsheet Using VBA</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231789#M6038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for pointing me in the right direction. Here's the code I ended up using:&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim EXCELApplication As Object
Set EXCELApplication = CreateObject("Excel.Application")
EXCELApplication.workbooks.Open &amp;lt;spreadsheet name&amp;gt;
EXCELApplication.Visible = True&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 11:44:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/opening-an-excel-spreadsheet-using-vba/m-p/231789#M6038</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2021-12-11T11:44:19Z</dc:date>
    </item>
  </channel>
</rss>

