XlsxDateTimeParsingMode

Inheritance: java.lang.Object

public class XlsxDateTimeParsingMode

Specifies how document text is parsed to identify date and time values.

Examples:

Shows how to specify autodetection of the date time format.


 Document doc = new Document(getMyDir() + "Xlsx DateTime.docx");

 XlsxSaveOptions saveOptions = new XlsxSaveOptions();
 // Specify using datetime format autodetection.
 saveOptions.setDateTimeParsingMode(XlsxDateTimeParsingMode.AUTO);

 doc.save(getArtifactsDir() + "XlsxSaveOptions.DateTimeParsingMode.xlsx", saveOptions);
 

Fields

FieldDescription
AUTOThe datetime format used in a document is determined automatically.
USE_CURRENT_LOCALEThe datetime format set for the current thread is used first to parse string values.
length

Methods

MethodDescription
fromName(String xlsxDateTimeParsingModeName)
getName(int xlsxDateTimeParsingMode)
getValues()
toString(int xlsxDateTimeParsingMode)

AUTO

public static int AUTO

The datetime format used in a document is determined automatically. This may take additional time.

USE_CURRENT_LOCALE

public static int USE_CURRENT_LOCALE

The datetime format set for the current thread is used first to parse string values. If the parsing fails, other common datetime formats are tried.

length

public static int length

fromName(String xlsxDateTimeParsingModeName)

public static int fromName(String xlsxDateTimeParsingModeName)

Parameters:

ParameterTypeDescription
xlsxDateTimeParsingModeNamejava.lang.String

Returns: int

getName(int xlsxDateTimeParsingMode)

public static String getName(int xlsxDateTimeParsingMode)

Parameters:

ParameterTypeDescription
xlsxDateTimeParsingModeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int xlsxDateTimeParsingMode)

public static String toString(int xlsxDateTimeParsingMode)

Parameters:

ParameterTypeDescription
xlsxDateTimeParsingModeint

Returns: java.lang.String