|
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
writing to ms excel with jexcel
HiRichard White 05/11/08 10:15 A hiRichard White 05/15/08 04:07 P when i say below, there seems to have been 2 threads for this one subject... the other is http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56346Richard White 05/15/08 04:20 P does anyone know how to access the time object so i can format it with the time hh:mm:ssRichard White 05/16/08 12:36 P i just manged to find it out:Richard White 05/16/08 01:36 P the stuff I did with jexcelapi is here:denstar 05/17/08 12:02 P Hi i have been using jexcel to read documents and it is working great. i got my first initial example from someone on this forum however, i now need to create a new ms excel file and write data to it all with jexcel. i know its possible as the jexcel provides the instructions (http://www.andykhan.com/jexcelapi/tutorial.html#writing) but they are all in java and not in coldfusion, and i am not that good yet to know how to translate the java instructions to coldfusion instructions i have found many tutorials on how to read data from excel using jexcel but not 'writing data' specifically using coldfusion does anyone know of any tutorials i can go through, or would anyone be kind enough to provide me with a translation of the java instructions into coldfusion please :) i know its just a few lines of code, basically creating a new excel document, writing cells, and writing and closing the document thanks very much for any help you can give me richard hi you showed me the way to add specific cell formats below, but i was just wondering whether anyone knew how to set full column formats using this jexcel thanks richard when i say below, there seems to have been 2 threads for this one subject... the other is http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56346 ----- Excess quoted text cut - see Original Post for more ----- does anyone know how to access the time object so i can format it with the time hh:mm:ss i am doing the date as follows: DateFormat = createObject("java", "jxl.write.DateFormat"); DateTime = createObject("java", "jxl.write.DateTime"); customDateFormat = DateFormat.init( "dd/mm/yyyy-hh:mm:ss"); dateCellFormat = WritableCellFormat.init(customDateFormat); cellData = DateTime.init(q2-1,q3,currentData,dateCellFormat); sheet.addCell(cellData); but cannot work out to see set it to the time thanks ----- Excess quoted text cut - see Original Post for more ----- i just manged to find it out: DateFormat = createObject("java", "jxl.write.DateFormat"); DateTime = createObject("java", "jxl.write.DateTime"); customDateFormat = DateFormat.init( "hh:mm:ss"); dateCellFormat = WritableCellFormat.init(customDateFormat); cellData = DateTime.init(q2-1,q3,currentData,dateCellFormat,true); // true gets it to process it as a time sheet.addCell(cellData); ----- Excess quoted text cut - see Original Post for more ----- the stuff I did with jexcelapi is here: http://code.google.com/p/cfjexcel/ there's rudimentary formula stuff and whatnot, might be something useful in there to rip. :denny -- Any sufficiently advanced technology is indistinguishable from magic. Arthur C. Clarke
|
Mailing Lists
|
Latest Fusion Authority Articles
|
||||||