Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
mov
Esteemed Contributor III

Re: Import data from Excel : issue with formatting

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.

10 Replies
mov
Esteemed Contributor III

Re: Import data from Excel : issue with formatting

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

Re: Import data from Excel : issue with formatting

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

mov
Esteemed Contributor III

Re: Import data from Excel : issue with formatting

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

Re: Import data from Excel : issue with formatting

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

mov
Esteemed Contributor III

Re: Import data from Excel : issue with formatting

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

Re: Import data from Excel : issue with formatting

Michael,

I was talking about ajout_dans_easyfan field.

I did nothing for FBID so far

mov
Esteemed Contributor III

Re: Import data from Excel : issue with formatting

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

Re: Import data from Excel : issue with formatting

Michael,

Thank you for the advice.

Not applicable

Re: Import data from Excel : issue with formatting

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?

Community Browser