The Daily Click ::. Forums ::. Klik Coding Help ::. Excel Spreadsheet ---> MMF2 Array
 

Post Reply  Post Oekaki 
 

Posted By Message

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
12th December, 2010 at 22:21:54 -

I made a very simple little app to generate MMF2 arrays from Excel spreadsheets.
You can already do that using CSV files, but then you're limited to 2 dimensional arrays.
This uses XML spreadsheet files, which means it can generate 3 dimensional arrays (from multiple sheets).

It might also work with MS Works Spreadsheet files (*.wks), as these appear to be just XML files with an added header.

It uses the EasyXML extension:
http://ext.neatwares.ath.cx/ext/EasyXML_Object

I would have built an .exe, but MMF isn't letting me for some reason... (so if anyone is feeling kind )

Anyway, the source is here:
http://cid-b1e7ee094271bbda.office.live.com/self.aspx/Public/XMLArray.mfa

Edited by Sketchy

 
n/a

OMC

What a goofball

Registered
  21/05/2007
Points
  3516

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
12th December, 2010 at 23:32:11 -

http://jollycrouton.com/Uploads/TDC/XMLArray.exe

Nice work. You should make it a download so when we need it later we don't have to search the forums.

 

  		
  		

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
13th December, 2010 at 00:42:18 -

Thanks very much OMC

 
n/a

Kirby Smith

Resident Slacker

Registered
  18/05/2003
Points
  479

VIP Member360 OwnerWii OwnerThe Cake is a Lie
13th December, 2010 at 04:16:51 -

Awesome. I was actually just wondering the other day if this was feasible.

 
XBL Gamertag: Rampant Mjolnir

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
14th December, 2010 at 13:28:53 -

This is actually one of the best apps EVAR! Great cudos to you sketchy!

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
14th December, 2010 at 13:47:37 -

Thanks very much.
I still find it weird that Clickteam didn't include a way to edit the contents of an array from the frame editor.
There's the "Data Grid" extension (MMF2ev. only), but again that's only 2 dimensional.

I actually tried making a full-blown array editor a while back, but it was too much work. It's not like I could make anything to rival Excel anyway, so this seemed like a more sensible way to go.


Anyway, I thought of one more change I want to make before I submit it for the downloads section.
I want to make it ignore hidden rows and columns - that way you could include labels/comments/etc, without them affecting the exported MMF2 array.
Hidden rows are easy enough, but columns are a bit more tricky - could take some time...

 
n/a

kirbyhi3



Registered
  03/03/2010
Points
  1
22nd December, 2010 at 03:26:32 -

Am I the only one having trouble opening this? I installed the EasyXML extension in the correct place, yet I always says: "Cannot load EasyXML.mfx. This object might need an external program or library not yet installed". I get this message even when running the executable posted.(I also already have excel, the required .dlls, etc)

Is there any other program involved with using this extension that I need for it to work?

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
22nd December, 2010 at 11:36:48 -

Sounds like you're missing a required windows .dll?
See this thread:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=60433&page=1

I'm still trying to make a new version that ignores hidden cells, but it's proving *really* tricky.

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
24th December, 2010 at 01:51:19 -

I'm not sure if anyone else had this, but all the .xml files I throw through it are blank...

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th December, 2010 at 01:56:12 -

Curious. Post an xml file here, and I'll take a look.

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
24th December, 2010 at 02:28:27 -

http://dl.dropbox.com/u/16909290/animations.xml

http://dl.dropbox.com/u/16909290/animation.db

the top one's the .xml and the bottom is the output file. I didn't want to spend the money for Microsoft Office when I built my computer, so I used OpenOffice Calc and saved it as an XML flie, I don't know if that makes a difference.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th December, 2010 at 03:03:54 -

I can see at least one reason why it wouldn't like your file - there's a difference in the way the worksheet tag is written.

Excel 2003: <Worksheet ss:Name="Sheet1">
OpenOffice: <ss:Worksheet ss:Name="Sheet1">

The extra "ss:" would stop it working at the moment. I'll fix that in the next version.
In the meantime, try deleting the "ss:" infront of the worksheet tag, and see if that works (don't remove it from anywhere else though).

EDIT: Or since your array is only 2d, you could just use .csv format, and the dynamic array extension.

Edited by Sketchy

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
24th December, 2010 at 03:49:21 -

That seems to have done the trick, although I have to be careful and save it as another file, or else I won't be able to open it again. You and your 0-based index, and after I set it all up to have a 1-based index.

Which reminds me, if I try to counteract that and be smart by just moving the sheet over to the right and down one, it still keeps the X on zero. Maybe it was just a freak accident. Not too sure.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
24th December, 2010 at 03:50:25 -


Originally Posted by Sketchy
I can see at least one reason why it wouldn't like your file - there's a difference in the way the worksheet tag is written.

Excel 2003: <Worksheet ss:Name="Sheet1">
OpenOffice: <ss:Worksheet ss:Name="Sheet1">

The extra "ss:" would stop it working at the moment. I'll fix that in the next version.
In the meantime, try deleting the "ss:" infront of the worksheet tag, and see if that works (don't remove it from anywhere else though).

EDIT: Or since your array is only 2d, you could just use .csv format, and the dynamic array extension.



I would use that, but I'm planning on doing the array as 3d, just haven't gotten that far yet.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th December, 2010 at 04:23:49 -

0-based is better - if only because fastloops are 0-based.
If in doubt, just fill the first row and column with zeroes or something.

The combination of blank cells and hidden columns is proving to be a real pain

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
25th December, 2010 at 22:00:21 -

A new and improved version is available here:
http://www.create-games.com/download.asp?id=8360

@HorrendousGames - it should hopefully fix the problems you've been experiencing.

Happy Christmas

Edited by Sketchy

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
26th December, 2010 at 00:35:56 -

Awesome man, I'll check it out!

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
26th December, 2010 at 03:43:58 -

Updated version available:
http://www.create-games.com/download.asp?id=8360

Version 1.2 - fixes a bug where empty rows were being skipped, and adds array editing functions.

Edited by Sketchy

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
6th January, 2011 at 04:02:11 -

A new and improved version of my Array Editor is now available:
http://www.create-games.com/download.asp?id=8360

It opens both XML Spreadsheets (Excel/OpenOffice) and MMF2 Arrays, and can now also save in both formats.
In addition, it has some basic built-in array viewing/editing tools.
Plus, I've fixed some bugs.

Edited by Sketchy

 
n/a
   

Post Reply



 



Advertisement

Worth A Click