Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
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
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>
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
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