Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Macro export - Encoding

Hi,

We are trying to export straight table to .csv/.tab file with macro use, and I needed the file to be encoded as UTF-8.

My problem is that we export several files that are in ANSI encoding,

Therefore the Encoding type under User Preferences is set to ANSI.


The default export encoding in the document properties is set to UTF-8, it's still export as ANSI. 

if anyone can help it's will be great,

Thanks!

1 Solution

Accepted Solutions
luciancotea
Valued Contributor

Re: Macro export - Encoding

User Preferences supersedes Document Settings.

But you can specify encoding using macro:

ActiveDocument.GetSheetObject("CH01").Export "D:\pivot.csv", ",", 65001, false

4 Replies
luciancotea
Valued Contributor

Re: Macro export - Encoding

I tested in the interface (right-click on table -> Export...) and file is saved correctly (as stated in User Preferences -> Export)

Maybe you can post your macro to replicate the problem.

Not applicable

Re: Macro export - Encoding

That's correct, this action is exported as stated in user Preferences,

I need to export the file like it's stated in the document properties...

luciancotea
Valued Contributor

Re: Macro export - Encoding

User Preferences supersedes Document Settings.

But you can specify encoding using macro:

ActiveDocument.GetSheetObject("CH01").Export "D:\pivot.csv", ",", 65001, false

Not applicable

Re: Macro export - Encoding

Amazing, thnks