<?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 Re: Export Part Lists from multiple sheets in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595839#M55387</link>
    <description>For j=1 to oDoc.Sheets.Count&lt;BR /&gt;'Code&lt;BR /&gt;If oSheet.PartsLists.Count &amp;gt; 0&lt;BR /&gt;'Go on with export.&lt;BR /&gt;oExportPath = folderName &amp;amp; oSheet.Name &amp;amp; ".xls"&lt;BR /&gt;End if&lt;BR /&gt;Next</description>
    <pubDate>Thu, 16 Apr 2015 20:06:33 GMT</pubDate>
    <dc:creator>MechMachineMan</dc:creator>
    <dc:date>2015-04-16T20:06:33Z</dc:date>
    <item>
      <title>Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595690#M55385</link>
      <description>&lt;P&gt;I stumbled across some iLogic that I am having a hard time manipulating.&amp;nbsp; I am looking to export&amp;nbsp;Part Lists from multiple sheets (&amp;nbsp;pipe spools)&amp;nbsp;of an IDW.&amp;nbsp; I would like the code to export "SPOOL:*"&amp;nbsp;to&amp;nbsp;separate excel files called SPOOL#*. (Where each "*" is a sheet.)&amp;nbsp; I am unsure create code that loops to the next sheet while writing the correct excel file.&amp;nbsp; Any help or advice is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800080; font-weight: bold;"&gt;ThisDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Document&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Sheet&lt;/SPAN&gt;
&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;oSheet = oDoc.Sheets(1) ' first sheet&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sheets&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;Sheet:1&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; sheet by name&lt;/SPAN&gt;

&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; say there is a Partslist on the sheet.&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PartsList&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;PartsLists&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt;

&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; export the Partslist to Excel.&lt;/SPAN&gt;

&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; folderName = "C:\temp"&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;folderName&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800080; font-weight: bold;"&gt;ThisDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Path&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Export&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;folderName&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;\Partslist.xls&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;PartsListFileFormatEnum&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;kMicrosoftExcel&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Apr 2015 18:46:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595690#M55385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-16T18:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595839#M55387</link>
      <description>For j=1 to oDoc.Sheets.Count&lt;BR /&gt;'Code&lt;BR /&gt;If oSheet.PartsLists.Count &amp;gt; 0&lt;BR /&gt;'Go on with export.&lt;BR /&gt;oExportPath = folderName &amp;amp; oSheet.Name &amp;amp; ".xls"&lt;BR /&gt;End if&lt;BR /&gt;Next</description>
      <pubDate>Thu, 16 Apr 2015 20:06:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595839#M55387</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-16T20:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595866#M55388</link>
      <description>&lt;P&gt;MechMachineMan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the quick response.&amp;nbsp; I'm not really good at this whole iLogic thing.&amp;nbsp; I thought I interpreted your code correctly.&amp;nbsp; If I run the code below,&amp;nbsp;a message appear twice that says "SaveAs method of Workbook class failed".&amp;nbsp; Do you mind elaborating on your code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;DrawingDocument&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800080; font-weight: bold;"&gt;ThisDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Document&lt;/SPAN&gt;

&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;Inventor&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Sheet&lt;/SPAN&gt;
&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;oSheet = oDoc.Sheets(1) ' first sheet&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sheets&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;SPOOL:1&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; sheet by name&lt;/SPAN&gt;


&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt; say there is a Partslist on the sheet.&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Dim&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;PartsList&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;PartsLists&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt;


&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;For&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;j&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;1&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oDoc&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Sheets&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Count&lt;/SPAN&gt;
&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;Code&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;If&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;PartsLists&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Count&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN style="color: #000000; font-weight: bold;"&gt;0&lt;/SPAN&gt;
&lt;SPAN style="color: #808080; font-style: italic;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-style: italic;"&gt;Go on with export.&lt;/SPAN&gt;
&lt;SPAN style="color: #800000;"&gt;oPartslist&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Export&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;folderName&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN style="color: #800000;"&gt;oSheet&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-weight: bold;"&gt;Name&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;&amp;amp;&lt;/SPAN&gt; &lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;.xls&lt;/SPAN&gt;&lt;SPAN style="color: #008080;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;PartsListFileFormatEnum&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;kMicrosoftExcel&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-weight: bold;"&gt;)&lt;/SPAN&gt;


&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;End&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;If&lt;/SPAN&gt;
&lt;SPAN style="color: #ff0000; font-weight: bold;"&gt;Next&lt;/SPAN&gt; &lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Apr 2015 20:20:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5595866#M55388</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-16T20:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5596028#M55390</link>
      <description>It might not need the ".xls". Also, the for loop has to surround the part&lt;BR /&gt;where it grabs the parts like if you want it to go through all of the&lt;BR /&gt;sheets.</description>
      <pubDate>Thu, 16 Apr 2015 22:33:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5596028#M55390</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2015-04-16T22:33:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5596033#M55391</link>
      <description>&lt;P&gt;Hi rtrayes13,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There were a couple of issues with the file path your last code sample:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;a backslash was needed between the folder path and the file name&lt;/LI&gt;
&lt;LI&gt;using the sheet name as the xls file name means that a colon is used in the file name, which is not permitted, so we have to remove or replace the colon, In the example below it's replaced with an underscore.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oDoc As Inventor.DrawingDocument
oDoc = ThisDoc.Document
Dim oPartslist As PartsList
Dim oSheet As Inventor.Sheet

'get folder (using the same path as this doc)
folderName = ThisDoc.Path

'look at each sheet
For Each oSheet in oDoc.Sheets
'get the first parts list on the sheet
oPartslist = oSheet.PartsLists(1)
'replace colon in sheet name with underscore
oName = Replace(oSheet.Name, ":","_") 
'export each parts list
oPartslist.Export(folderName &amp;amp; "\" &amp;amp; oName  &amp;amp; ".xls", PartsListFileFormatEnum.kMicrosoftExcel)
Next 

'tell the user the files were created
MessageBox.Show("New *.xls files created in: " _
&amp;amp;vblf &amp;amp; folderName, "iLogic")

'open the folder where the new folders are saved
Shell("explorer.exe " &amp;amp; folderName &amp;amp; "\" ,vbNormalFocus)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2015 22:39:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5596033#M55391</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2015-04-16T22:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605332#M55497</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp; It worked like a charm.&amp;nbsp; I do have one final question, I think it would be better served if it were to export&amp;nbsp;the parts list&amp;nbsp;"IF" there was a parts list on the sheet.&amp;nbsp; I'm not sure if this would work with the code you provided since it seems like it does it for all sheets within the document rather than each sheet individually.&amp;nbsp; Generally, our drawing packages do not have parts lists on the first and sometime the last sheet.&amp;nbsp; I apologize it seems like I am asking you to do my dirty work but I appreciate your help.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 15:33:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605332#M55497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T15:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605661#M55499</link>
      <description>&lt;P&gt;Hi rtrayes13,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is the same rule with a Try/Catch/End Try added that will handle the error created when a sheet doesn't have a parts list. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;BR /&gt;Best of luck to you in all of your Inventor pursuits,&lt;BR /&gt;Curtis&lt;BR /&gt;&lt;A href="http://inventortrenches.blogspot.com" target="_blank"&gt;http://inventortrenches.blogspot.com&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Dim oDoc As Inventor.DrawingDocument
oDoc = ThisDoc.Document
Dim oPartslist As PartsList
Dim oSheet As Inventor.Sheet

'get folder (using the same path as this doc)
folderName = ThisDoc.Path


	'look at each sheet
	For Each oSheet in oDoc.Sheets
	'get the first parts list on the sheet
	Try
	oPartslist = oSheet.PartsLists(1)
	'replace colon in sheet name with underscore
	oName = Replace(oSheet.Name, ":","_") 
	'export each parts list
	oPartslist.Export(folderName &amp;amp; "\" &amp;amp; oName  &amp;amp; ".xls", PartsListFileFormatEnum.kMicrosoftExcel)
	Catch
	End Try
	Next 


'tell the user the files were created
MessageBox.Show("New *.xls files created in: " _
&amp;amp;vblf &amp;amp; folderName, "iLogic")

'open the folder where the new folders are saved
Shell("explorer.exe " &amp;amp; folderName &amp;amp; "\" ,vbNormalFocus)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 18:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605661#M55499</guid>
      <dc:creator>Curtis_Waguespack</dc:creator>
      <dc:date>2015-04-23T18:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605699#M55500</link>
      <description>&lt;P&gt;Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 23 Apr 2015 18:37:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/5605699#M55500</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-23T18:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6720238#M68326</link>
      <description>&lt;P&gt;Hi Curtis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Similar to&amp;nbsp;&lt;SPAN&gt;rtrayes13 problem, i would like to export Parts List to excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The issue that i have is that i might have more than one part list on a single sheet.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Firstly, can this be done and if so i am after a code that does;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Search all sheet(s) for part list(s)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Import the Part List(s) to excel (preferable all on same excel sheet with a gap between each part list)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;* If there are more than one sheets in idw then excel can be the same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;** Eg idw sheet 1 has 4 part list therefore excel sheet 1 will have 4 parts list all with a gap between them&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;amp; if idw sheet 2 has 2 part list then excel sheet 2 will have 2 part list all with a gap between them&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Save file location in same location as idw.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 01:14:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6720238#M68326</guid>
      <dc:creator>cain.hillier</dc:creator>
      <dc:date>2016-12-01T01:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6721331#M68337</link>
      <description>&lt;P&gt;I think exporting the parts lists always recreates the output excel file, therefore to achieve multiple on one sheet you will need to export to a temporary excel file and then move the data to your working spreadsheet.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2016 14:13:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6721331#M68337</guid>
      <dc:creator>MechMachineMan</dc:creator>
      <dc:date>2016-12-01T14:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6723324#M68353</link>
      <description>&lt;P&gt;From my understanding,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there is 4 part lists on a sheet,&amp;nbsp;&lt;/P&gt;&lt;P&gt;creating a code will produce 4 excel documents and then , you would have to copy all them and place them in a single document?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you happen to know a code that can export more than one part list on a sheet to separate excel documents?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 05:23:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6723324#M68353</guid>
      <dc:creator>cain.hillier</dc:creator>
      <dc:date>2016-12-02T05:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6769427#M68907</link>
      <description>&lt;P&gt;I am working through a similar challenge. I have multiple parts lists on multiple sheets. I am looping through using the export parts-list function and pushing the information into a single excel spreadsheet.&amp;nbsp;I have found that if a table (worksheet name) is specified during export to excel, and that table exist it will prompt to overwrite. If a table is not specified it will append another worksheet to the same excel document. This is the behavior I&amp;nbsp;am looking for as a user may need to do this from multiple drawing files, into the same spreadsheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is a spreadsheet with many tabs, then we are pulling that into another single worksheet with a macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to push them to spreadsheets with different names, you would probably want to build a naming scheme that included the sheet and parts list loop counter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully that clarifies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 25 Dec 2016 22:05:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/6769427#M68907</guid>
      <dc:creator>tmuel</dc:creator>
      <dc:date>2016-12-25T22:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Export Part Lists from multiple sheets</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/8204511#M87762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;HR /&gt;&lt;P&gt;Hello Curtis,&lt;/P&gt;&lt;P&gt;I'm new to Ilogic and Macros. I tried the code that you had placed up on the board is there a trick to making it work.&amp;nbsp; I did just a copy and paste.&lt;/P&gt;&lt;P&gt;we have many spools and bom that we need to export for now I'm doing it manually and grinding it out but it takes so long... this code would help greatly if I can get it to work.&lt;/P&gt;&lt;P&gt;Thanks for any input..&lt;/P&gt;&lt;P&gt;Garrett&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 15:56:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/export-part-lists-from-multiple-sheets/m-p/8204511#M87762</guid>
      <dc:creator>G.Binl</dc:creator>
      <dc:date>2018-08-16T15:56:37Z</dc:date>
    </item>
  </channel>
</rss>

