Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Specialist
Specialist

User Preferences supersedes Document Settings.

But you can specify encoding using macro:

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

View solution in original post

4 Replies
luciancotea
Specialist
Specialist

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
Author

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
Specialist
Specialist

User Preferences supersedes Document Settings.

But you can specify encoding using macro:

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

Not applicable
Author

Amazing, thnks