Hi experts, my script like this: var file = new File("~/Desktop/Book contents and page number.txt"); for(var i = 0; i < app.selection.length; i++) { if (app.selection.hasOwnProperty ( "baseline" )) { myContents = app.selection.contents; WriteToFile(file, myContents); } else if (app.selection.constructor.name == "Cell") { myCellCeontents = app.selection.cells.everyItem().texts.everyItem().contents; myCellCeontents += "\r"; WriteToFile(file, myCellCeontents); } else exit (); } function WriteToFile(file, text) { file.encoding = "UTF-8"; file.open("w"); file.write(text); file.close(); file.execute(); } for report my selection contents. but after run script see screen movie: my come out like this: 2014,HK$’000,,,,921, ,,34,321, ,,4,250, ,,662, ,,45,11,027, ,,, ,,555,5,087, ,,5,642, it isn't my goal. how can I make the result like this: 2014 HK$’000 921 34,321 4,250 662 45 11,027 555 5,087 5,642 thanks regard John
... View more