Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have got a real problem.
I want to export my tables as csv-files to input them into another application (not Qlikview).
However, I export them with the following:
STORE
<< fields >>
from
Table
into
Table.csv (txt, delimiter is ';' );
The problem is that the other application wants just real csv-files and does not "see" the stored ones. If I open them in Excel after stored from QV and say "Save" and close them it looks like the csv-file is just a text file with csv-ending because when I do "Save As" the selected file-type is "Unicode Text (*txt)" but I requested "*.csv". Anyone knows how I can export real csv-files.
The problem is that I can start the other application via QV-Script and that should work without manual work.
Thanks in advance!
Kind regards
Micha
Unicode Text just means that it's encoded as UTF-8. It's still an csv file (actually semicolon separated instead of comma separated). If you specify a file name with a .csv extension other applications will see it as a csv file too.
Well, the problem is, that this particular application doesnt see it until I resave it with Excel.
Hi.
Why do you use ';' as a delimiter ? CSV means comma-separated-values, try using comma.
Micha,
a .csv file is indeed just a plain text file:
http://en.wikipedia.org/wiki/Comma-separated_values
So if you need to open and store in excel, are you changing the file format / file extension herewith (please check out the real file extension, Windows allows hiding known file extensions in explorer from the user)?
Maybe your other application expects either an excel file (.xls or .xlsx) or a csv file but with other file extension?
Could you post a sample file here to the forum (one original file exported from qvw, one imported and saved from Excel)? An upload option is available from advanced editor.
It looks like the problem stems from Qlikview only 'storing' in UTF-8 format for text files. When loading FROM csv you can change the codepage to whatever you need, but you cannot do it (as far as I know) in a store command.
If you open a csv created by a store command in MS Word in Windows Default Text encoding, you will see the following characters at the beginning ...

... which signify the Byte Order Mark (BOM) of the Unicode Standard. Specifically it is the hex bytes EF BB BF, which form the UTF-8 representation of the BOM (source - http://forum.joomla.org/viewtopic.php?t=275353).
Are there any settings in your application that can allow for this? Alternatively you may need to build a batch file to open the file in notepad and re-save it with ANSI encoding. Then it should work.
flipside
I think flipside is totally right. Is there a way to change the storing format from UTF-8 to ANSI like it is allowed in the LOAD-command? I think it is totally a QV-problem.
FYI: I changed it from ';' to ',' before open a thread here, this was not a solution. It didn't change anything.
The help menu suggests this cannot be changed so you would need to go to Qliktech to see if it can be overridden.
It is possible to specify a codepage in a macro if you can get this working ...
sub ExportToCSV
set tb = ActiveDocument.GetSheetObject("TB99")
tb.Export "Final.csv",",",0
end sub
Where 0 = ANSI, 1200 = Unicode, 65001 = UTF-8. You might need ServerSideExport or ServerSideExportEx on a server.
Hi Flipside..
How can i convert the TEXT Format into CSV Format....Actually i have created a schduler task in Qlikview Server and the Log File for that am getting in TaskName.Text....i need to convert that into csv format..Pls its urgent..
this is saved my life.