This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-26 04:38:06

vpai100
New Scratcher
Registered: 2012-10-26
Posts: 1

Exporting

How do you automatically export a list. Can the data be organized on excel? I'm making a project for 75,000 college students and i need to be able to export the data onto an excel sheet, and needs o be organized like this: NAME-COLLEGE-EMAIL-PHONE
Not like this:   
NAME         
COLLEGE
EMAIL
PHONE
NAME
COLLEGE
EMAIL
PHONE
HELP!!! I NEEDS TO BE DONE IN TWO DAYS

Offline

 

#2 2012-10-26 12:01:14

fuz50
Scratcher
Registered: 2008-09-19
Posts: 100+

Re: Exporting

First of all, is all your data on the same list? If you have separate lists for all the categories (name, college...) and each person is assigned the same number on every list, you can individually import or copy-paste all your lists into excel, I believe. Well, after you export your lists from scratch (right-click, export).


http://img10.imageshack.us/img10/7404/cooltext529102298.jpg
http://siggen.toontown-click.de/sig1.pnghttp://siggen.toontown-click.de/sig2.png

Offline

 

#3 2012-10-26 12:11:01

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: Exporting

Scratch currently can't automatically export. But what you can do, is have four lists: names, college, email, phone. Then have another list that you can name whatever you want and then using the the (join [] []) block you can do something like this:


when I receive [export v]

set [i v] to [1]

delete (all v) of [export v]

repeat (length of [names v] )  

add (join (item (i) of [names v] ) (join [-] (join (item (i) of [college v] ) (join [-] (join (item (i) of [email v] ) (join [-] (item (i) of [phone v] ))))))) to [export v]

change [i v] by (1)

end

It will take a while in Scratch, but after the script is finished, you can export the contents of the export list to a file and that should give you the format you need.

If your current list is in the format of your original post (name, college, email, phone, name, etc) you can use this script:


when I receive [export v]

set [i v] to [1]

delete (all v) of [export v]

repeat (length of [names v] )  

set [combine v] to (item (i) of [data v] )

change [i v] by (1)

set [combine v] to (join (combine) (join [-] (item (i) of [data v] )))

change [i v] by (1)

set [combine v] to (join (combine) (join [-] (item (i) of [data v] )))

change [i v] by (1)

set [combine v] to (join (combine) (join [-] (item (i) of [data v] )))

add (combine) to [export v]

change [i v] by (1)

end

And then export the same way.  smile

Offline

 

Board footer