I've backed off from using the form tool as it mangled my excel sheet (if
you add it to an existing sheet, it adds a timeline column header, but
doesn't move your existing data over one column; misaligning it all), and it
seems (correct me if I'm wrong) that you have to have a 1:1 column header :
form question connection; you can have data, but if you want it to have a
header, it must be a question on the form.  Anyhow; the comma option is
great, but I can't rely on my form users to not use commas in other entry
areas, potentially mucking up the data as it turns out.  The temptation is
growing to pass the spreadsheet feed through a quick perl program to massage
the data I'm using, but it's so far mostly custom quirks that probably don't
belong in the interface (though -- a per-field ability to run a regex on the
data before it was implemented... I wonder how much of a performance hit
that would be?)

On Feb 12, 2008 9:55 PM, David Huynh <[EMAIL PROTECTED]> wrote:

> Since there's a huge potential with using Google Spreadsheet forms for
> creating Exhibit data, I've just added a setting that lets you set the
> separator to be comma instead of semicolon:
>
>    <link rel="exhibit/data"
>        type="application/jsonp"
>        href="... ?alt=json-in-script"
>        ex:converter="googleSpreadsheets"
>        ex:separator="," />
>
>
> Let me know if it doesn't work.
>
> David
>
> David Huynh wrote:
> > Jon Camfield wrote:
> >
> >> First off; Exhibit is an amazing tool; any developers who make it to
> >> DC; lemme know -- I'll buy you a beer.
> >>
> > Can't ever say no to free beer... :)
> >
> >
> >> I'm trying to use Google's new "form input" to their spreadsheet to
> >> enable people to add data to an Exhibit data spreadsheet, but Google
> >> does comma-separated values for their checkbox input; does anyone know
> >> if there's a way to transform those to semicolons automatically, or
> >> set Exhibit to treat commas within a field as separators?
> >>
> > The Google Spreadsheet converter is implemented as
> > Exhibit.JSONPImporter.googleSpreadsheetsConverter in
> >
> >
> >
> http://static.simile.mit.edu/exhibit/api-2.0/scripts/data/importers/jsonp-importer.js
> >
> > You can see the line where the cell is split
> >
> >     var fieldValues = cell.val.split(";");
> >
> > What you can do is declare your own converter:
> >
> >     <script>
> >         var myGoogleSpreadsheetConverter = function(json, url) {
> >            ... copy the code over from the official converter, replace ;
> > with ,
> >         };
> >         myGoogleSpreadsheetConverter.preprocessURL = function(url) {
> >             return url.replace(/\/list\//g, "/cells/");
> >         };
> >     </script>
> >
> > and then for your data link, specify
> > ex:converter="myGoogleSpreadsheetConverter".
> >
> >
> >> Thanks!
> >> (also, is there an IRC channel somewhere for these questions, or is it
> >> preferred to get the answers archived in mailman?)
> >>
> > This mailing list is preferred.
> >
> > Cheers,
> >
> > David
> >
> > _______________________________________________
> > General mailing list
> > [email protected]
> > http://simile.mit.edu/mailman/listinfo/general
> >
>
> _______________________________________________
> General mailing list
> [email protected]
> http://simile.mit.edu/mailman/listinfo/general
>



-- 
Jon Camfield
http://www.JonCamfield.com
MA, Elliott School of International Affairs in International Science and
Technology Policy
RPCV 2002-04, Ministry of Education, Kingston, Jamaica
PGP Key: http://joncamfield.com/pgp.key.txt
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to