Skip to main content
1-Visitor
November 21, 2012
Question

Export to Excel

  • November 21, 2012
  • 2 replies
  • 4152 views

I'm trying to create my own version of the code that Windchill uses to export Action Items to Excel. I've been looking through the code and it references classes in the package "com.ptc.util.spreadsheet" that I can't find. Anybody know in what jar file these classes are located? I can't compile my code because I need to include these classes in my Classpath.

2 replies

1-Visitor
November 28, 2012

I think, the Spreadsheet.jar is available in <Windchill>\srclib\wnc which you can be unjar to windchill\com\ptc\util\ and then you may use it for your code. I am not skilled in customization but giving a try to look into this.

1-Visitor
December 10, 2012

Theresa,

Did you make any progress on this? I have a similar problem: I'm trying to include images in the data that is exported to Excel.

Thanks,

Tom

tstacy1-VisitorAuthor
1-Visitor
December 10, 2012

I decided to go with a JSP that streams my query results out. I set the contentType to "application/vnd.ms-excel". Then I ran my InfoEngine task and looped through the results, getting the values that I wanted to display. My customers didn't want the images, so I don't know if this method would work with them. I did finally locate the spreadsheet.jar file, but by then I had changed direction.

1-Visitor
December 10, 2012

Thank you.

I don't quite understand your response - I don't know what it means to run an InfoEngine task, for instance. And is the JSP is to be triggered independently of the Windchill app, from a separate web app? Or is it somehow wired into the Windchill UI? And how would the JSP interact with the Windchill code?

As you can probably infer, I have no experience with Windchill (I was assigned this task a day or so ago). If you could send me the JSP, or some sample code, that would help tremendously.

Thanks!