Thank you for posting this. I just ran into the same issue.
I found a solution for this when using .NET automation. You can specify the omission of the BOM.
In VB.net, it looks like the following:
--Start code snippet--
Dim settings As XmlWriterSettings = New XmlWriterSettings()
settings.Encoding = New System.Text.UTF8Encoding(False)
Dim xSource = XDocument.Load(sFile)
'Make changes here
Dim writer As XmlWriter = XmlWriter.Create(sFile, settings)
--End code snippet--
Glad it saved you some time. We found the same property on the XML writer - I had meant to post back that you could do that.
Thank you so much for the post. I spend few days trying to find the info online, it works now.
I am having a problem uploading a newly zipped TWBX file in a similar fashion to this post.
May I ask what you guys did to update the TWB and rezip the folder after completed?
I have successfully updated the XML file and it works great but when I zip it into a TWBX Tableau will not open it, tells me there was unexpected problem with the file. Did you guys have any luck actually updating and publishing in TABCMD?
The issue I was having was just due to the byte order mark. I was only publishing a *.twb file, not a *.twbx, so I didn't have to zip anything.
I'm pretty sure you can just re-package by hand by zipping up the right files. As I recall there are a few entries in the XML of the actual workbook file which need to be expressed right for the packaged workbook to work - relative paths for the files or some such, as I recall.
I'd just use a file comparison tool to spot the differences between the contents of a working one and the one you are having trouble with.
Can you open the packaged workbook from Desktop but not publish with tabcmd - or is it also broken when you try from Desktop? What is the exact error that you get?
I can see where this is a little different but yes I am still having problems with the publishing.
From another post I have I am finding that the compression type is causing problems with Tableau. Here is the post Updated TWB and then Zipping TWBX?
The file fails to open when I manually try to double click on it and open in Tableau, and gives a similar error in TABCMD. From the post above you can see there is a small difference between the TWBX files from the 7zip screen shots. I cannot really use Notepad++ to compare the files because they are pretty jumbled up messes. Encrypted I believe.
The error is super generic: " ***Bad Request - An unexpected error occurred opening the packaged workbook. "