Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Import data from Excel : issue with formatting

Hi all,

I try to import an Excel file in QV 9 but I have some issues as you can see in the 1st screenshot

import-window.png

The Excel file is the following :

excel-file-to-import.png

As you can realize in the attached file, all the columns are typed (date, standard, ...).

Why does the auto import process fail ?

Thanks in advance for any advice.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Yes, it is obvious - but the absense of the data in ajout_dans_easyfan has nothing to do with the format of this field.  It is about the relation of the data fields you use in the table.

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Richard,

There is nothing wrong with this.  It is just a presentation format.  To see it as a date, use date() function around your field in the script.  Or even leave as is, and assign date format to it on the front end.

Regards,

Michael

Not applicable
Author

Michael,

I tried the 2 solutions proposed, but all of them failed.

Any other ideas ?

1st one :

date-formatting.png

and the 2nd :

date-formatting2.png

Anonymous
Not applicable
Author

Richard,

If the date is really numeric in Excel, I can't think of the reason why it may fail.  The only think I'd do differently is to use floor() function to get rid of decimals, unless you need a timestamp, not just date:

date(floor(yourfield), 'DD/MM/YYYY')

Anyway, what is the actual result?  how the ajout_dans_easyfan list box look like?  And what is the number property of this field in the document properties - number?

Regards,

Michael

Not applicable
Author

Michael,

As you can see below, the situation is very strange, because if I display only the field I get something good, but something wrong in the table !

I follow my investigation.

date_formatting3.png

Anonymous
Not applicable
Author

Oh, but the FBID is a different field.  The problem you're getting in the table has nothing to do with the format of the date field you read from Excel.

Not applicable
Author

Michael,

I was talking about ajout_dans_easyfan field.

I did nothing for FBID so far

Anonymous
Not applicable
Author

Yes, it is obvious - but the absense of the data in ajout_dans_easyfan has nothing to do with the format of this field.  It is about the relation of the data fields you use in the table.

Not applicable
Author

Michael,

Thank you for the advice.

Not applicable
Author

Richard,

I downloaded your Excel file, used the script wizard, loaded the data and created a table box. Unfortunately, this stupid editor hangs when I try to paste the table box here, but I can assure you:

without adding ANY code, the dates look like dates, and the only blank field is the "annonceur nomme admin", which was blank in the original file. All the FBID numbers came up properly, and associated with the correct entries.

I'm using QV 11 though; perhaps they made improvements since QV 9 on data import?