Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

convert string to array to write to document

$
0
0
I have a string that looks like this: str = "{ "number" : "1", "street" : "one"}, { "number" : "2", "street" : "two" }, { "number" : "3", "street" : "three" }, { "number" : "4", "street" : "four" }, ...etc }"; and I'm writing it to a document like so: var sw = new StreamWriter("mydoc.doc"); sw.Write(str); Is there a way I can convert the string into an array, before it gets written to the doc? So that it can fit into an excel sheet nicely?

Viewing all articles
Browse latest Browse all 1875

Trending Articles