Page 1 of 3

Table Editor Tool (Excel) Update: Image Support

Posted: Mon Oct 12, 2009 8:12 am
by wolph42
One of the things I lately discovered in MT is the tables section, which I a VERY helpfull addtition. However creating tables within MT is rather a big fuss and (after having a discussion in the Macro forum) I found out that there just doesn't exit an external editor cause the tables need to be 'programmed' in a specific xml format.

So with some help I created an Editor in Excel where you can create a table in a less fussy way, export it to a text file and import it in MT. This topic is however hidden in the Macro section where It doesn't really belong and since I can't move it I thought to repost it in this section.

The discussion can be found here
The online excel (google docs) version is here
and the actual excelfile is attached to this post.

Edit: I've made it a bit easier to handle tables that are too long for xls to handle in one go. Extra entry in the xls has been added that deals with this.

NEW: Table Editor Tool with Images Support
XLS tools for Images v2.1
Support macro v2.0 (Needed for XLS tool)
Manual can be found inside the xls.

Note that v1.0 (attached to this post) is still the most useful to create tables without Images!

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 12:37 pm
by Azhrei
Until MapTool has a nicer built-in table editor, I think this is an important external tool. I've made this thread a Sticky so others will see it (hopefully).

At some point it would be great if someone with OpenOffice could try this out and report back on whether it works for them or not. But having a GoogleDocs version goes a long way towards interoperability.

It looks like this doesn't include the image field of the table -- but just getting the text into a table is a huge step in the right direction!

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 3:59 pm
by wolph42
the image field... hmm hadn't thought about that, I guess that I would mainly use the function for text tables, but I'll have a look if its possible to implement images as well. It all depends how its stored in the xml format and how easy it is to get it into excel.
More on this later

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 5:06 pm
by Azhrei
Won't be easy as the value for that will will probably be MapTool's asset id (basically a checksum of the image). My guess is that you won't find any kind of checksum facility within the spreadsheet though.

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 6:01 pm
by wolph42
well I just figured that out...:
this is one of the cards from the default section

Code: Select all

 <imageId>
        <id>a4411095cee0408dae13bb565d6c40cc</id>
      </imageId>
and a token:

Code: Select all

      <imageId>
        <id>931c72c41be77a3b317cc6627c959f94</id>
      </imageId>
And I have absolutely no clue how to calculate such checksums.Though Im guessing thatthat even if I would figure that out, it still would be the same fuss to add pictures in excel as it would be in MT (as both would require drag n drop).
Still if someone can explain the checksum to me I willing to give it a try.

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 8:20 pm
by Full Bleed
Nifty. Anyway we can get this more integrated into MT to save some steps?

Could this be used as a base to do some kind of direct MT import/export into this format?

Re: Table Editor Tool (Excel)

Posted: Mon Oct 12, 2009 10:06 pm
by Hawke
Looking at this a bit - are there no functions to edit/create tables? Just get results?

Re: Table Editor Tool (Excel)

Posted: Tue Oct 13, 2009 12:22 am
by Azhrei
Full Bleed wrote:Nifty. Anyway we can get this more integrated into MT to save some steps?
Um, probably not.

Instead of patching something like this into MT, we really should just have a better UI to begin with. Since that's the focus of 1.4, I expect we'll see this re-thought.

There's been discussion on the forums about tables with multiple columns and so forth. I'm not sure any of that will be implemented, but something needs to be done!
Hawke wrote:Looking at this a bit - are there no functions to edit/create tables? Just get results?
That's correct. Bummer, eh? :cry:

Re: Table Editor Tool (Excel)

Posted: Thu Mar 18, 2010 1:43 pm
by ziltmilt
This is a nifty tool, but one thing in the instructions is not so easy to do for us poor souls using Windows Vista: changing the file extension back from .zip to just .mttable. This kind of thing used to be so easy ...

Good gravy, I HATE Vista.

Re: Table Editor Tool (Excel)

Posted: Thu Mar 18, 2010 1:55 pm
by wolph42
ziltmilt wrote:This is a nifty tool, but one thing in the instructions is not so easy to do for us poor souls using Windows Vista: changing the file extension back from .zip to just .mttable. This kind of thing used to be so easy ...

Good gravy, I HATE Vista.
http://tinyurl.com/y8uxze4
:wink:
(And yes I have a severe dislike for Vista as well.. windows 7 on the other hand is, I have a bit of trouble to say this about a MS product: very good :| )

Re: Table Editor Tool (Excel)

Posted: Thu Mar 18, 2010 2:00 pm
by ziltmilt
Thanks, man. I got my table imported, and am using a JSON object for each value of my table. So, I noticed that each key/value is surrounded by double quotes.

For example, this value in Excel

{"TimeValue":"6 seconds","NumberValue":"2","ExtendedRange":"100 ft"}

got turned into this value in Maptool, in the newly imported table

{""TimeValue"":""6 seconds"",""NumberValue"":""2"",""ExtendedRange"":""100 ft""}

I just tried the import again with no quotes around the key/values in Excel and the table contents look like this:

{TimeValue:6 seconds,NumberValue:2,ExtendedRange:100 ft}

Any idea what I'm doing wrong?

Re: Table Editor Tool (Excel)

Posted: Thu Mar 18, 2010 2:22 pm
by wolph42
I've noticed that too. What I do is a search "" and replace " in the text editor. Works fine. Don't forget to remove the " at the beginning and the end of the text. Edit:(the fact that you got it imported should have been a clue for me that you did)

Re: Table Editor Tool (Excel)

Posted: Mon Mar 22, 2010 3:23 pm
by CyrusStonecypher
I'm having problems. :(
The error and the table I'm attempting to import are attached.
What have I done wrong?

EDIT: I replaced all of these ’ with ' and the error changed slightly. Do MapTool tables not like punctuation?

Code: Select all

---- Debugging information ----
message             :  : entity reference names can not start with character ' ' (position: START_TAG seen ...<value>C14; Balthorr\'s Rare & ... @71:37) 
cause-exception     : com.thoughtworks.xstream.io.StreamException
cause-message       :  : entity reference names can not start with character ' ' (position: START_TAG seen ...<value>C14; Balthorr\'s Rare & ... @71:37) 
EDIT SOME MORE: It seems that ’ and ' had nothing to do with it. & was the problem. I know & doesn't play well and thought I'd already removed it. My problem is fixed. :)

Table Editor Tool (Excel) Update: Image Support

Posted: Tue Jul 12, 2011 5:44 am
by wolph42
I've upgraded the xls tool with Image support. You can find the link in the original post. Manual is within the xls sheet.

Note that the version 1.0 is still the most usefull when you're not adding images to the table.

Its interesting as this tool (v1.0) was my first contribution to maptool, I had no clue about macro's whatsoever but it was the first hurdle I encountered at the time and I haven't changed anything of it until now, which is about 2 years later...

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

Posted: Mon Dec 26, 2011 3:28 pm
by neofax
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.