Re: Converting this java code into cfscript?

2012-06-12 Thread Richard White

Thanks Leigh, made a lot of sense and works perfect!! 

See http://pastebin.com/M5CNshBp . Looks like my post got cut off again ...

 
-Leigh


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351553
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Converting this java code into cfscript?

2012-06-09 Thread Richard White

Hi, 

I am having difficulty understanding how i would change the follower Java code 
into cfscript... specifically the 'new CellRangeAddress' section:

CellRangeAddress cellRangeAddress = sheet.getMergedRegion(i);
CellRangeAddress newCellRangeAddress = new CellRangeAddress(newRow.getRowNum(),
(newRow.getRowNum() +
(cellRangeAddress.getFirstRow() -
cellRangeAddress.getLastRow())),
cellRangeAddress.getFirstColumn(),
cellRangeAddress.getLastColumn());

thanks for your help 


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351520
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting this java code into cfscript?

2012-06-09 Thread Leigh

 CellRangeAddress cellRangeAddress = sheet.getMergedRegion(i);

Just drop the data type declarations in front of the variable names. Then 
instantiate classes with init() instead of new ClassName( ...). You may also 
want to break it up for better readability. I am heading out and cannot test 
this, but something along these lines:


   // not tested
   cellRangeAddress = sheet.getMergedRegion(i);
   firstRow = newRow.getRowNum();
   lastRow =  newRow.getRowNum() + (cellRangeAddress.getFirstRow() - 
cellRangeAddress.getLastRow());
   firstCol = cellRangeAddress.getFirstColumn();
   lastCol  = cellRangeAddress.getLastColumn();
   cellRangeAddress = createObject(java, 
org.apache.poi.hssf.util.CellRangeAddress);
   cellRangeAddress = cellRangeAddress.init( f

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351522
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Converting this java code into cfscript?

2012-06-09 Thread Leigh

See http://pastebin.com/M5CNshBp . Looks like my post got cut off again ...

 
-Leigh

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351523
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm