Jan 6
I've come across this before but have never thought to blog about it,
simply because it was quite an easy implementation in the end-up.
If you're exporting data from an HTML table to an Excel workbook,
then the following will save you some time when trying to get Microsoft
Excel to format the data. and display it as you desire.
Using Microsofts own Office XML format, you can style \ format the
cell data using "CSS like" syntax.
For example, if you wish to format a date column, you can simply add a
style attribute with the content style='mso-number-format:"mm\/dd\/yyyy"'.
This format is pretty self explanatory, but will format a given date in
the format "10/01/2011" for 10th January 2011.
<td style="mso-number-format:"mm\/dd\/yyyy">
10/01/2011
</td>
If you're a stickler for seperation, like I am, you can take this
further by defining CSS Rules in a stylesheet and specifying the class
name in your HTML elements.
Read more...
Jan 5
After New Years - we returned to a sickly server, and something I
never came across before - so I thought I'd share this with you all!
Background
Our servers are deployed as Multiple J2EE Instances runnng the latest version of ColdFusion 9.0.1.
When we tried accessing one particular application, we got the following error:
The Cron service is not available.
This exception is usually caused by service startup failure. Please check your server configuration.
Don't be fooled by the error message, the real issue lies in a corrupted server file.
Turns out the neo-cron.xml file was corrupted.
Read more...
Dec 10
To mark the 101st post on my Blog, and to complement my thoughts on what content I wish to publish on my blog in order to keep it current, I have decided that I will be writing some material on the following areas:
- 101 - ColdFusion variables and scopes, to include complex and simple variable types.
- 101 - Anatomy of a ColdFusion CFC.
- ColdFusion by Example - A series of posts that provide examples of some of the most commonly used ColdFusion Tags and Functions grouped by type, with practical examples.
- Syntax is easy, programming is hard. A general guide on how to concentrate more on the actual programming side of development rather than getting caught up with the syntax!
It's a tall order, I know, and it'll take discipline in order to keep the momentum going with this, but the idea is to provide some useful output during this process e.g. code snippets \ templates along the way that can be used and altered by anyone (including me) during development.
Nov 5
I was working on calling a remote template via <cfhttp /> recently and was experiencing a Connection Failure Error.
Scratching my head I proceeded to inspect what was going on in my code and on the wire with Firebug.
At first I thought I had resolved the issue when I discovered my return type was a complex value (struct) but my elation was quickly drowned by the "CTRL+F5" key combination :-(
Without any luck I decided to consult the WWW.
After a quick search I discovered that it was due to the reponse being Compressed from IIS. Apparantly the HTTPCompression algorithm used by some versions of IIS is incompatible with ColdFusion (Java).
Workaround
The work-around was to specify additional HTTP Headers telling IIS _NOT_ to use compression for that response. See below...
<cfhttp
url="http://someURL.com/svcs/targetTemplate.cfm?argument1=value1&argument2=value2"
method="get"
compression="none"
result="remoteCallResult" >
<cfhttpparam type="header" name="Accept-Encoding" value="deflate;q=0" />
<cfhttpparam type="header" name="TE" value="deflate;q=0" />
</cfhttp>
OR
<cfhttp
url="http://someURL.com/svcs/targetTemplate.cfm?argument1=value1&argument2=value2"
method="get"
compression="none"
result="remoteCallResult" >
<cfhttpparam type="header" name="Accept-Encoding" value="*" />
<cfhttpparam type="header" name="TE" value="deflate;q=0" />
</cfhttp>
That should do the trick!
Credit and a more detailed breakdown of this can be found at Steve Erat's Blog
Recent Comments