Open thorade opened 6 years ago
I was facing the same issue and found a solution, simply by editing the saving function in the VBA editor.
Change the "SaveConversionResultToFile" as follows:
`Public Sub SaveConversionResultToFile(ByVal pModel As IModel) Dim sFileName As String sFileName = pModel.AbsoluteFileName If sFileName = "" Then Exit Sub
Dim fsT As Object
Set fsT = CreateObject("ADODB.Stream")
fsT.Type = 2 'Specify stream type - we want To save text/string data.
fsT.Charset = "utf-8" 'Specify charset For the source text data.
fsT.Open 'Open the stream And write binary data To the object
fsT.WriteText pModel.GetConversionResult
fsT.SaveToFile sFileName, 2 'Save binary data To disk
End Sub`
The result is that the file generated will be UTF-8 directly
Nice! Could you submit that as a Pull Request? And in the text, reference this issue as #24?
I'm not so familiar with GitHub mechanics.
But feel free to post it.
@thorade Until PR gets accepted, you can use "Copy to Clipboard", right?
OK, thanks, will try that. ADOB.Streams does not work on Mac, it seems. What platforms did you test your PR on?
Windows 7, Office 365. Try to contribute for Mac :), maybe this will help: http://talesoftech.blogspot.com/2011/05/excel-on-mac-goodbye-vba-hello.html.
@thorade, if you are able to test #28 on Mac, can you please describe the behavior? Which error you exactly get (assuming that ADODB.Stream
is not supported)? I would like to handle errors in that case, at least saying "This feature is not (yet) supported on Mac".
Hi @thorade, I am about to implement Unicode -> UTF-8 encoder on my own so it's platform independent. Stay tuned.
When saving a table to a tex file, that file has ANSI encoding, so if the table contains e.g. ÄÖÜ I currently need to open the file in Notepad++ and convert to UTF-8. Would it be possible to either store the file as UTF-8 directly, or convert Ö to {\"O} ??
I filed a similar issue years ago: https://bugs.launchpad.net/excel2latex/+bug/944134 but the workaround used there does not work anymore, because I switched from pdflatex to lualatex.
Any ideas for a new workaround or solution? By now all editors support UTF-8, and pdflates also supports utf8.