Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Champion III
Champion 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.

View solution in original post

10 Replies
Highlighted
Champion III
Champion 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

Highlighted
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

Champion III
Champion 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

Highlighted
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

Highlighted
Champion III
Champion 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.

Highlighted
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

Highlighted
Champion III
Champion 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.

View solution in original post

Highlighted
Not applicable

Re: Import data from Excel : issue with formatting

Michael,

Thank you for the advice.

Highlighted
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?