Table Editor Tool (Excel) Update: Image Support

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

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

Post 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.

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

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

Post 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

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

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

Post 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.

User avatar
CoveredInFish
Demigod
Posts: 3104
Joined: Mon Jun 29, 2009 10:37 am
Location: Germany
Contact:

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

Post 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" 


brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

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

Post 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.

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

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

Post 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

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

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

Post 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

username
Dragon
Posts: 277
Joined: Sun Sep 04, 2011 7:01 am

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

Post 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...)


uthin
Kobold
Posts: 6
Joined: Fri Oct 16, 2015 1:45 pm

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

Post 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?


uthin
Kobold
Posts: 6
Joined: Fri Oct 16, 2015 1:45 pm

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

Post by uthin »

Thanks for the quick action and reply! :)

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

ecclektik
Kobold
Posts: 17
Joined: Thu Dec 12, 2019 11:50 pm

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

Post by ecclektik »

Thoughts on this error?
Attachments
Screenshot_1.png
Screenshot_1.png (34.35 KiB) Viewed 861 times

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

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

Post 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'.

Post Reply

Return to “MapTool”