hi paul, thanks again for this

just one more thing then i have everything i need :)

there are sections in the documentation that allows for number formatting and 
date formatting such as:

 WritableCellFormat integerFormat = new WritableCellFormat 
(NumberFormats.INTEGER);
Number number2 = new Number(0, 4, 3.141519, integerFormat);
sheet.addCell(number2);

WritableCellFormat floatFormat = new WritableCellFormat (NumberFormats.FLOAT);
Number number3 = new Number(1, 4, 3.141519, floatFormat);
sheet.addCell(number3);

 NumberFormat fivedps = new NumberFormat("#.#####");
WritableCellFormat fivedpsFormat = new WritableCellFormat(fivedps);
Number number4 = new Number(2, 4, 3.141519, fivedpsFormat);
sheet.addCell(number4);

 // Get the current date and time from the Calendar object
Date now = Calendar.getInstance().getTime();
DateFormat customDateFormat = new DateFormat ("dd MMM yyyy hh:mm:ss");
WritableCellFormat dateFormat = new WritableCellFormat (customDateFormat);
DateTime dateCell = new DateTime(0, 6, now, dateFormat);
sheet.addCell(dateCell); 

and i have noticed that you translated it to:

labelObj=createObject("java","jxl.write.Label");   
  numberObj=createObject("java","jxl.write.Number"); 
thisLabel=labelObj.init(0,0,"happy happy gizmo");   
  sheet.addCell(thisLabel);   
  thisNumber=numberObj.init(0, 1, 3.1459);   
  sheet.addCell(thisNumber); 

therefore how would you translate this formatting stated above

thanks very much

richard



>> kind enough to  provide me with a translation of the java instructions
>> into coldfusion please :)
>
>
><cfscript>
>       outFile = createObject("java", 
> "java.io.File").init("e:\temp\excel\test.xls"); 
>       workBook=createObject("java","jxl.Workbook").createWorkbook(outFile);
>       labelObj=createObject("java","jxl.write.Label");
>       numberObj=createObject("java","jxl.write.Number");
>       ////////////////////////////////////////////////
>       sheet = workBook.createSheet("First Sheet", 0); 
>       thisLabel=labelObj.init(0,0,"happy happy gizmo");
>       sheet.addCell(thisLabel); 
>       thisNumber=numberObj.init(0, 1, 3.1459);
>       sheet.addCell(thisNumber);
>       workbook.write();
>       workbook.close();
></cfscript> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:305067
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to