m-kovalsky / Tabular

Useful code for tabular modeling and automation.
MIT License
156 stars 60 forks source link

Descriptions enhancement : add support for different code page #10

Closed cpassuel closed 2 years ago

cpassuel commented 2 years ago

Your scripts for exporting/exportings descriptions are very usefull, however it uses the default Excel code page which can be an issue on non English Excel version.

It would be nice to add an origin variable to set the code page (close to other variables definitions) in ExportDescriptions.cs: object origin = Type.Missing; // 65001 for UTF-8; and use excelApp.Workbooks.OpenText(textFilePath, origin, 1, ... instead of excelApp.Workbooks.OpenText(textFilePath, Type.Missing, 1, ...

Exporting and importing DisplayFolder could be nice also even if it's not strictely descriptions.

Thanks

m-kovalsky commented 2 years ago

Thanks. Fixed in v1.0.1. The same concept can be applied to Display Folders (or really an model property). You can also use the Metadata Export for this (at least the export functionality).