You can add the options method to export shown in this
https://forums.autodesk.com/t5/inventor-ilogic-and-vb-net-forum/ilogic-to-export-parts-list-to-xls-u...
Below is the relevant code and also extra options remove as necessary. Table Name is the excel sheet name.
' create a new NameValueMap object
oOptionsBOM = ThisApplication.TransientObjects.CreateNameValueMap
'specify an existing template file'to use For formatting colors, fonts, etc
oOptionsBOM.Value("Template") = "Y:\SUPPORT\Excel Templates\Purchasing BOM Template.xls"
'specify the columns to export
oOptionsBOM.Value("ExportedColumns") = "ITEM#;QTY;PART#;MATERIAL;DESCRIPTION;COMMENTS;COM CODE;TOTAL WT."
'specify the start cell
oOptionsBOM.Value("StartingCell") = "B11"
'specify the XLS tab name'here the file name is used
oOptionsBOM.Value("TableName") = "BILL OF MATERIALS"
'choose to include the parts list title row'in this example "Ye Old List of Parts" is written to the StartingCell
oOptionsBOM.Value("IncludeTitle") = False
'choose to autofit the column width in the xls file
oOptionsBOM.Value("AutoFitColumnWidth") = True
'get BOMrget folder path
oFolderBOM = Left(ExportPath, InStrRev(ExportPath, "\")) & "BOM"
'Check for the BOM folder and create it if it does not exist
If Not System.IO.Directory.Exists(oFolderBOM) Then
System.IO.Directory.CreateDirectory(oFolderBOM)
End If
' export the Partslist to Excel with options
oPartslist.Export(oFolderBOM & "\" & ThisDoc.FileName(False) & ".xls", PartsListFileFormatEnum.kMicrosoftExcel, oOptionsBOM)
If this solved a problem, please click (accept) as solution.
Or if this helped you, please, click (like)
Regards
Alan