xelem.3.0

nl.fountain.xelem
Class XLUtil

java.lang.Object
  extended by nl.fountain.xelem.XLUtil

public class XLUtil
extends Object

A utility class for xelem.


Method Summary
static String convertToHex(int r, int g, int b)
          Converts rgb to a string.
static String format(Date date)
          Formats a Date into a Date-Time value used by SpreadsheetML.
static Date parse(String dateString)
          Parses a string in the DateTime format used by SpreadsheetML to a Date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

convertToHex

public static String convertToHex(int r,
                                  int g,
                                  int b)
Converts rgb to a string. Like #ff00ba

Parameters:
r - the value of red (0 - 255)
g - the value of green (0 - 255)
b - the value of blue (0 - 255)
Returns:
A String starting with # + the two-digit hex-code for r, g and b.

format

public static String format(Date date)
Formats a Date into a Date-Time value used by SpreadsheetML.

Parameters:
date - The date to be formatted.
Returns:
A string of format yyyy-MM-ddTHH:mm:ss.SSS.

parse

public static Date parse(String dateString)
Parses a string in the DateTime format used by SpreadsheetML to a Date.

Parameters:
dateString - the string to be parsed
Returns:
the corresponding Date
Throws:
ParseException - if the string could not be parsed

xelem.3.0