Compare commits
2 Commits
e8b094b700
...
d5d5be67e7
| Author | SHA1 | Date | |
|---|---|---|---|
| d5d5be67e7 | |||
| f2a9bc9e0f |
@ -36,8 +36,8 @@
|
||||
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
|
||||
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
|
||||
<WebPage>publish.html</WebPage>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.13.0</ApplicationVersion>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>7.2.13.1</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
|
||||
@ -562,6 +562,11 @@ namespace ENI2.Excel
|
||||
{
|
||||
result = cellValue.GetDateTime();
|
||||
}
|
||||
else if (cellValue.IsTimeSpan)
|
||||
{
|
||||
TimeSpan timespan = cellValue.GetTimeSpan();
|
||||
result = new DateTime(timespan.Ticks);
|
||||
}
|
||||
else if (cellValue.IsNumber)
|
||||
{
|
||||
double numValue = 0;
|
||||
@ -774,7 +779,7 @@ namespace ENI2.Excel
|
||||
string dateString = ReadCellAsText(sheetName, range);
|
||||
if (dateString != null)
|
||||
{
|
||||
string[] formats = { "yyyy/MM/dd HH:mm", "yyyy/MM/dd", "dd.MM.yyyy", "dd-MM-yyyy", "d/M/yyyy", "dd/M/yyyy", "d/MM/yyyy", "dd/MM/yyyy", "d/MMM/yyyy", "dd/MMM/yyyy", "yyyy-MM-dd", "yyyy-mm-d" };
|
||||
string[] formats = { "yyyy/MM/dd HH:mm", "yyyy/MM/dd", "dd.MM.yyyy", "dd-MM-yyyy", "d/M/yyyy", "dd/M/yyyy", "d/MM/yyyy", "dd/MM/yyyy", "d/MMM/yyyy", "dd/MMM/yyyy", "yyyy-MM-dd", "yyyy-MM-d", "dd.MM.yyyy HH:mm:ss", "dd.MM.yyyy HH:mm" };
|
||||
if (DateTime.TryParseExact(dateString, formats, NumberFormatInfo.InvariantInfo, DateTimeStyles.None, out DateTime tmpDate))
|
||||
return tmpDate;
|
||||
CultureInfo en = CultureInfo.CreateSpecificCulture("en-US");
|
||||
|
||||
@ -1702,7 +1702,7 @@ namespace ENI2.Excel
|
||||
|
||||
string s = reader.ReadCellAsText(sheetTitle, string.Format("J{0}", 54 + i));
|
||||
// All invalid codes become "0000", Oct/25
|
||||
l10fc.PortFacilityGISISCode = (s != null) && Regex.IsMatch(s.Trim(), @"^\d{4}$") ? s.Trim() : "0000";
|
||||
l10fc.PortFacilityGISISCode = (s != null) && Regex.IsMatch(s.Trim(), @"^\d{1,4}$") ? s.Trim().PadLeft(4, '0') : "0000";
|
||||
|
||||
l10fc.PortFacilitySecurityMattersToReport = reader.ReadCellAsText(sheetTitle, string.Format("K{0}", 54 + i), 255);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user