cancel
Showing results for 
Search instead for 
Did you mean: 

Import a date from excel

Former Member
0 Kudos

Hi! I want to import an order from excel worksheet to my SBO form. I succeed in inserting all the fields except that of the date (DocDueDate). I want to know if it exists a particular format or a method for being able to do this.

Best Regards

Matteo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1) I get the date as a string. The format is DDMMYYYY

2) I'm trying to emulate manual typing inside the EditText using:

oApp.Forms.ActiveForm.Items.Item("12").Specific.value = docdate

docdate is a string (eg. "01032006")

Using 'Specific.text' instead of 'Specific.value' gives me an error

Former Member
0 Kudos

EditText Object ...

according to UIAPI ...

the EditText Object has following properties:

BackColor

DataBind

FontSize

ForeColor

ScrollBars

String

SuppressZeros

TextStyle

Value

all and all ... in EditText, there is nothing like as Item().Specific.TEXT

try Item().Specific.STRING

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1) getting date from Excel:

What format does the date have?

Are you able to convert the value to the Date Type ?

2) putting into the SBO form:

Are you filling it into the DataSource, or just typing it as a String into the EditText?

These are the basic questions, you have to ask yourself.

1)

For example: there is a difference when accessing the Excell Cells(x,y).Value and the Cells(x,y).Text

.Value is usually in Date_Variable format, but the Text is formated to for example MM-DD-YYYY format.

Perhaps you're not able to convert the MM-DD-YYYY into the date variable, thus you will have to change the "MM-DD-YYYY" into the "DD.MM.YYYY" format so you can put it somewhere.

2)

Same problem is with the insertion of date into the SBO, when filling the EditText.String, you will have to convert it into the date, according to the SBO settings ... for example: "MM.DD.YYYY"

...

There is also the SBObob object, which has the "Format_StringToDate" method, which will convert the string, into the format for DataSource...

Regards,

Jaro