PDA

View Full Version : trying to put text from a docx into a xlsx via applescipt




mnonat
Apr 22, 2012, 05:01 PM
Hi there,

i really need help ....:/

i am trying to write a applescipt but i really have no idea where to start.

is there anybody who can help?

this is what i am trying to do...

i do have a word sheet and it looks like this




Siemens Aktiengesellschaft 80333 München EUR 73515 Mio (Konzernumsatz 2011), EUR 7... 350500 (Konzernbeschäftigte 2011), 402700 (2...
Robert Bosch Gesellschaft mit beschränkter Haftung 70839 Gerlingen EUR 47259 Mio (Konzernumsatz 2010), EUR 3... 274530 (Konzernbeschäftigte 2011), 276418 (2...
HERAEUS HOLDING Gesellschaft mit beschränkter H... 63450 Hanau EUR 22000 Mio (Konzernumsatz 2011), EUR 2... 13000 (Konzernbeschäftigte 2011), 12569 (201...
MAN SE 80805 München EUR 14675 Mio (Konzernumsatz 2010), EUR 1... ca. 46000 (Konzernbeschäftigte 2011), 45885 (...
Aurubis AG 20539 Hamburg EUR 9000 Mio (Konzernumsatz 2011), EUR 98... 6200 (Konzernbeschäftigte 2012), 6200 (2011),...

what i am trying, is to put this data in a excel sheet...

the first part is the company till the ZIP code 12345 the next one is the city... and so on...

i am really desperate.... :/

so i am very thankful if there is anybody who can help....!!!



sero
Apr 23, 2012, 05:20 PM
Hi there,

i really need help ....:/

i am trying to write a applescipt but i really have no idea where to start.

is there anybody who can help?

this is what i am trying to do...

i do have a word sheet and it looks like this




Siemens Aktiengesellschaft 80333 München EUR 73515 Mio (Konzernumsatz 2011), EUR 7... 350500 (Konzernbeschäftigte 2011), 402700 (2...
Robert Bosch Gesellschaft mit beschränkter Haftung 70839 Gerlingen EUR 47259 Mio (Konzernumsatz 2010), EUR 3... 274530 (Konzernbeschäftigte 2011), 276418 (2...
HERAEUS HOLDING Gesellschaft mit beschränkter H... 63450 Hanau EUR 22000 Mio (Konzernumsatz 2011), EUR 2... 13000 (Konzernbeschäftigte 2011), 12569 (201...
MAN SE 80805 München EUR 14675 Mio (Konzernumsatz 2010), EUR 1... ca. 46000 (Konzernbeschäftigte 2011), 45885 (...
Aurubis AG 20539 Hamburg EUR 9000 Mio (Konzernumsatz 2011), EUR 98... 6200 (Konzernbeschäftigte 2012), 6200 (2011),...

what i am trying, is to put this data in a excel sheet...

the first part is the company till the ZIP code 12345 the next one is the city... and so on...

i am really desperate.... :/

so i am very thankful if there is anybody who can help....!!!

well, I guess step 1 will be converting docx to something useful, like plain text for example. There should be a script floating around for that.
Then you can use awk|cut|etc to grab the data you want and dump it in a csv (why excel??).

Then you're done.

Mac_Max
Apr 23, 2012, 06:40 PM
Is each entry on its own line? If so you could save it as plain text, with the .csv extension appended, and import it into Excel as a comma separated values file. Each line will go into its own row and each line of text separated by a comma will go into its own column.

i.e.

Name, Address1, Address2, City, State, Zip

this will map roughly to:

A | B | C | D | E | F
Name | Address1 | Address2 | City | State | Zip

Then you can save it as an excel file.