Skip to main content
April 14, 2016
Question

Invoke wt.load.util.CSV2XML and wt.load.LoadFromFile commands from a java code

  • April 14, 2016
  • 2 replies
  • 2364 views

Hi All,

I am trying to bulk load wtdocuments into Windchill for which I have the content files and the attributes (name, number, description, version, state, IBAs etc) in an excel file. The usual method for bulk load is to create a CSV using the data in the excel file, then create an XML from the CSV (wt.load.util.CSV2XML) and finally load the documents into Windchill using the XML file (wt.load.LoadFromFile).

I am trying to create a java file which will read the excel file with the raw data, create a CSV and subsequently the XML file using it and then finally invoke the load command using the XML file. Before I put all of these together, I am trying out each step individually and am not able to figure out a way to invoke the wt.load.util.CSV2XML and wt.load.LoadFromFile from a java file. Has anyone tried that? Any ideas?

2 replies

1-Visitor
April 18, 2016

Hi,

CSV2XML. class present in Windchill,

de-compile it and save as CSV2XML_.java in your package.

simply call this CSV2XML_.main method in your class, it will convert csv to xml,

to LoadFromFile, use below

LoadFromFile.doFileLoad(filepath, null, null, null,cmd_line);

here, filepath= actual path of .xml file.

cmd_line = CONT_PATH.

Regards,

Vivek

5-Regular Member
June 29, 2019

Hi,

 

My scenario is same. we are migrating documents from network drives to Windchill 11.0. I want to know how to create a CSV (that can be used for CSV2XML utility) for bulk load using the excel file with attribute values in columns. 

 

Many Thanks