web stats
Mirth Community - View Single Post - Excel As Data Source
View Single Post
  #9  
Old 07-21-2011, 04:29 PM
DimitriA DimitriA is offline
Mirth Newb
 
Join Date: Jul 2011
Posts: 17
DimitriA is on a distinguished road
Default

Has anyone gotten this to work?

I am trying to write an excel file using this (from the tutorial on the API)

Code:
importPackage(Packages.jxl.Workbook);

WritableWorkbook workbook = Workbook.createWorkbook(new File("output.xls")); 
WritableSheet sheet = workbook.createSheet("First Sheet", 0); 

Label label = new Label(0, 0, "Name");
sheet.addCell(label);
Label label = new Label(1, 0, "Value");
sheet.addCell(label);

for(count=0; count<$('resultVal'); count++)
{

Label label = new Label(0, count, $('resultName')[count]);
sheet.addCell(label);

Number number = new Number(1, count, $('resultVal')[count]);
sheet.addCell(number); 
}
Any help?
Reply With Quote