Re: Importing data from the web
- To: mathgroup at smc.vnet.net
- Subject: [mg125170] Re: Importing data from the web
- From: Andy Ross <andyr at wolfram.com>
- Date: Sun, 26 Feb 2012 04:18:11 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201202250655.BAA01311@smc.vnet.net>
On 2/25/2012 12:55 AM, maria giovanna dainotti wrote: > Dear Math Group, > > I have a problem importing the data from a web page. > > data4 = {{"050318", "00111529"}, {"050401", "00113120"}} > Do[ > ID = data4[[i, 2]]; > s = Import["http://www.swift.ac.uk/xrt_curves/<>ID<>", "Text"]; > Print[s], > {i, 1, Length[data4]}] > > The error message is > $Failed > > I am really grateful if you could help me > > Best regards, > Maria > > Try re-writing as Do[ID = data4[[i, 2]]; s = Import["http://www.swift.ac.uk/xrt_curves/" <> ToString@ID, "Text"]; Print[s], {i, 1, Length[data4]}] The issue is that you are trying to do a StringJoin (<>) inside a string. You need to join separate strings "s1"<>"s2". -Andy
- References:
- Importing data from the web
- From: maria giovanna dainotti <mariagiovannadainotti@yahoo.it>
- Importing data from the web