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:

Table Editor Tool (Excel) Update: Image Support

Post 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!
Attachments
table2MTxml v1.0.xls.zip
(38.56 KiB) Downloaded 1178 times
Last edited by wolph42 on Thu Apr 19, 2012 6:04 am, edited 6 times in total.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Table Editor Tool (Excel)

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

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

Re: Table Editor Tool (Excel)

Post 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

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Table Editor Tool (Excel)

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

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

Re: Table Editor Tool (Excel)

Post 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.
Last edited by wolph42 on Tue Oct 27, 2009 9:35 am, edited 1 time in total.

User avatar
Full Bleed
Demigod
Posts: 4736
Joined: Sun Feb 25, 2007 11:53 am
Location: FL

Re: Table Editor Tool (Excel)

Post 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?
Maptool is the Millennium Falcon of VTT's -- "She may not look like much, but she's got it where it counts."

User avatar
Hawke
Great Wyrm
Posts: 2261
Joined: Sat Apr 21, 2007 12:12 am
Location: Albuquerque, NM

Re: Table Editor Tool (Excel)

Post by Hawke »

Looking at this a bit - are there no functions to edit/create tables? Just get results?

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Table Editor Tool (Excel)

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

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Table Editor Tool (Excel)

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

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

Re: Table Editor Tool (Excel)

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

ziltmilt
Dragon
Posts: 331
Joined: Sun Apr 29, 2007 9:28 pm
Contact:

Re: Table Editor Tool (Excel)

Post 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?
Last edited by ziltmilt on Thu Mar 18, 2010 2:28 pm, edited 1 time in total.

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

Re: Table Editor Tool (Excel)

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

User avatar
CyrusStonecypher
Giant
Posts: 158
Joined: Thu Nov 26, 2009 1:22 am
Location: Columbus, IN, U.S.A.

Re: Table Editor Tool (Excel)

Post 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. :)
Attachments
Waterdeep - Castle Ward.zip
(2.74 KiB) Downloaded 301 times
TableImportError.txt
(5.74 KiB) Downloaded 280 times

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

Table Editor Tool (Excel) Update: Image Support

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

neofax
Great Wyrm
Posts: 1694
Joined: Tue May 26, 2009 8:51 pm
Location: Philadelphia, PA
Contact:

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

Post 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.
Image
Time-Zone information UTC -5

Post Reply

Return to “MapTool”