cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to get the Part objects which are within Importable Spreadsheet in custom ImportFormProcessor?

SY_10256354
3-Visitor

How to get the Part objects which are within Importable Spreadsheet in custom ImportFormProcessor?

Hi,

I am writing a custom FormProcessor that extends OOTB ImportFormProcessor and overrides postTransactionProcess() method. This Custom FormProcessor gets called when we click on Import on Import from Spreadsheet wizard

SY_10256354_1-1674660424374.png

 

 

Added below entry in custom-action.xml

<objecttype resourceBundle="com.ptc.windchill.ixb.importer.importerResource" name="ixb" class="com.ptc.windchill.ixb.importer.ImportJob" >
<action checkaccess="true" name="createImportJob" uicomponent="IMPORT_FROM_EXCEL" >
<command method="execute" class="ext.tagheuer.part.formprocessors.customImportFormProcessor" url="/netmarkets/jsp/ixb/importer/import.jsp" windowType="popup"/>
</action>
</action>
</objecttype>

 

SY_10256354_0-1674659811814.png

 

Basically, my initial requirement is to get all the Part details those are within the Importable Spreadsheet.

Is there any API to get all the part details which are within Importable Spreadsheet?

Can someone suggest?

 

Regards,

SY

1 REPLY 1

Hi @SY_10256354 

The Spreadsheet is a excel file so you need an API to read the file.

I usually use following API to work with the excel files.

org.apache.poi.xssf.usermodel.XSSFWorkbook // general object to work with excel file XLSx (for old xls exists similar api)
XSSFSheet sheet = workbook.getSheetAt(0); // open sheet from excel
XSSFRow processRow = sheet.getRow(row); // get row from sheet
XSSFCell cell = processRow.getCell(0); // get cell from the row

Hope this can help

 

PetrH 

Top Tags