Page 2 of 3

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Thu Apr 19, 2012 6:02 am
by wolph42
neofax wrote:Just ran into a problem. Excel and LibreOffice CALC can only hold so many characters in a cell. The workaround is to unhide the columns and manually copy and paste the information into a text editor like notepad++ to make the context.xml.
I've added an extra entry in the xls tool to handle this issue.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 3:34 am
by brunoPatin
Hi, I've run into a small issue that should perhaps be documented somewhere. I am using LibreOffice on macOS and I'm going through the job of modifying the tables using eclipse more than the calc sheet (it works pretty well) though creating them with the calculus sheet. Nevertheless, at the beginning I used macOS archive utility in order to zip and unzip and this is not working. Extension can be zip but there is something different wrt their compression algorithm. It works if you use the zip command in a terminal. Thus you should perhaps put this information in your doc (the excel file itself?)
Hope it helps

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 4:26 am
by wolph42
Thanks for the feedback

So the archive utility on your mac cannot properly handle the MT zip files?
It would be nice if an other mac user can confirm this (to make sure it's not an isolated issue) I know that Azhrei has a mac and Ive never heard anything about this.

If its confirmed I'll add it to the doc.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 10:23 am
by CoveredInFish
Kind of confirmed. I just did one test.

Code: Select all

I ...
- made a copy of a working campaign file
- changed file extension to zip.
- decompressed it using mac os decompress tool (I just doubleclicked it)
  I am using Lion in case that matters.
- deleted the original renamed file.
- compressed the unpacked stuff
- renamed it again to cmpgn (tricky, once MacOS knew what file type this was it kept it as a zip file - had to use the information dialog instead of the simple rename function)
- tried to open it in MT b87, it failed telling me "java.io.IOException: Stream closed" 

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 11:56 am
by wolph42
thanks! I guess thats enough for an update in the xls. Im still curious to Azh's reply to this. Ill pm him.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 12:21 pm
by brunoPatin
I think that at some point I will take some minutes to analyse differences between archive utility and zip. As soon as it's done, I'll post the message.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sat May 19, 2012 1:00 pm
by brunoPatin
ok I did search a little the web. I think I've an explanation. If you consider the Archive utility, it has preferences and one concern archive format with three choices (in french :) ):
- archive compressé : means compressed archive
- archive standard : means standard archive whatever the actual meaning
- archive dans un fichier zip : zipfile archive
default is the first one and is probably not consistent wrt zip classical format.

I'm working on scripts to automate transformations thus won't have time to test my assumption.
Sorry

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sun May 20, 2012 4:59 am
by brunoPatin
Good morning

I worked a little and I think the solution is linked not to compression but to how archive utility is sorting thing in the archive. In fact, structure of the archive should be two files and a folder. When using archive utility you begin by creating a first folder in which these three files will be written. Here follows the small script I am using to transform a directory including only folders with these files into mttable. BTW I am pretty sure it works the same for every maptool exported file.

Code: Select all

#!/bin/tcsh -f
# shell de transformation de tables en format dézippés vers des tables en format
# mttable. Tout les répertoires sont effacés après l'opération ne laissant que
# des fichiers mttable
#
# TODO :
#  - utiliser un argument pour préciser le répertoire que l'on utilise
#
# creation : Bruno Patin
# date de creation : 19/05/2012
#   structure de compression incorrecte.
# modification : 20/05/2012

echo "La commande ne fonctionne que dans le repertoire ou se"
echo "trouvent les tables a transformer. le repertoire actuel est"
echo `pwd`
echo "si vous n'etes pas sur de votre fait, arretez tout de suite"
echo "continuez (oui/non)"
set reponse = $<
if ( $reponse != oui ) then
	echo "arret du script"
endif

# verification d'absence de fichiers (ne fonctionne que sur des fichiers
# sans caractères indus (blanc, tab ou autres)
foreach i (`ls`)
	echo $i
	if (-f $i) then
		echo "pb"
		exit 1
	endif
end
echo "fin de vérification 1"

# transformation après vérification du contenu et suppression des répertoires ne
# répondant pas aux conditions
foreach i (`ls`)
	echo $i
	if (!(-f $i/content.xml) || !(-f $i/properties.xml)) then
		echo "pb dans "$i
	else
		cd $i
		/usr/bin/zip -r ../$i.mttable ./content.xml ./properties.xml ./assets
		cd ..
	endif
	/bin/rm -r $i
end
hope it helps

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sun May 20, 2012 1:20 pm
by username
Since I don't have a MAC, this is what I guess is happening: The first option creates a tar/gzip, which creates (a) one big archive and then (b) compresses it. "zip", the third option, does it the other way around (b) and then (a). There are advantages and disadvantages to both ways. Neither usually gets the best compression rates, by the way. Only the second option is internal to Maptool (actually Java), while comprehending the second format necessitates a library to be added - which is not going to happen for 1.3b<anything>. It is unfortunate that the MAC uses the first option as default. (Half a decade ago, I would have said that it is unfortunate that Java went for the second option...)

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sun May 20, 2012 2:11 pm
by wolph42
Thank you all for the feedback. I'll update the xls when time permits.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Tue Apr 11, 2017 4:08 am
by uthin
The dropbox links to the files required for creating import files including support for images don't seem to work anymore? I just get 404 errors. Are the files hosted somewhere else now?

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Tue Apr 11, 2017 4:26 am
by wolph42
dropbox has been so nice as to break all public links on the entire internet. Chaos ensues...

links have been fixed.

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Tue Apr 11, 2017 8:56 am
by uthin
Thanks for the quick action and reply! :)

Now to figure out how to get around the zipping issue on my aging Mac. :)

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Sun Mar 01, 2020 11:13 pm
by ecclektik
Thoughts on this error?

Re: Table Editor Tool (Excel) Update: Image Support

Posted: Mon Mar 02, 2020 4:06 am
by wolph42
I think its a version conflict. You can try opening it in an older version of MT (eg B91) save it and then try to load it in a higher version.

edit: just checked it loads. I think you tried to load the file as a campaign file, which it isn't! Its macro set. Go to your campaign panel en right click in there and hit the 'import macro set'.