spreadsheet as text

I have a spreadsheet created in Numbers that I wold like to include on my website using text so it can be searched/ Currently I have PDFs but they aren’t searchable.

http://vipl.ca/Resources/Week%2027%20DL.pdf

Are there any good options for me?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Oh, and I would like it to be easily updated as well as some pretty formatting options…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try saving as a comma separated value file and then importing into freeway. It might get the data into FW but I think you will have to spend some time formatting the result.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Larry,
How did you implement your spreadsheet? I am interested in doing something similar, except I also need to sum and calculate. Thanks.
Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Do you want to be able to sum and calculate within Freeway, or within
Excel or Numbers?

Walter

On Mar 9, 2011, at 2:21 PM, jan smoot wrote:

Larry,
How did you implement your spreadsheet? I am interested in doing
something similar, except I also need to sum and calculate. Thanks.
Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have a client that has built a four sheet interactive spread sheet and wants me to “integrate” it into their site. One sheet is over 7000 rows of data, Next two sheets would be displayed. The fourth sheet contains the input data. The viewer is to enter a state (on the spreadsheet you type in the complete US state name, ie Virginia) and then a table is scanned and summed to display information (on sheet 3) for that state. Sheet two is a static summation of the data.

I am evaluating two implementation strategies. MySQL/PHP and editgrid.com.

I have looked at editgrid.com and I can display information, and possibly input the information, but then the entire spreadsheet has to have public RW permissions. The input strategy is also not optimal since the user has to type in the entire state name.

I have little php experience. Today, I setup the database and uploaded the data into a table. Am now sorting through the php actions on actionforge.com.

So, to answer your question, I guess the summing would be in freeway if I use php. Your insight and suggestions are greatly appreciated.

Thanks Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

and wants me to “integrate” it into their site.

I dont think that integrate is going to be the correct term for this.

More like ‘rewrite in PHP and MySql’ to run on the server.

The problem I then see is if there has to be migration between the server and the desktop.

David


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I have now looked at editgrid and this may be a better alternative if your client wants to stick with the spreadsheet idea.

My concern would be that this may not be a long term solution.

Reading their Blog http://blog.editgrid.com/2009/09/24/editgrid-changes-announcement which has the most recent post of September 2009 doesn’t inspire confidence in its longevity.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I would skip over most of those Actions. There are a couple which
allow you to integrate PHP code hand-written in a text editor into a
Freeway page – that’s where I would recommend you look most intensely.

First, get a copy of PHP and MySQL Web Development. http://www.amazon.com/PHP-MySQL-Web-Development-4th/dp/0672329166/ref=dp_ob_title_bk

Download a free copy of TextWrangler from http://barebones.com and
work through the first couple of chapters of the book.

Then have a look at the MyActiveRecord library for a very quick way to
get your database on line.

and Generate to create a working application from your data in a few
clicks:

Walter

On Mar 9, 2011, at 6:02 PM, jan smoot wrote:

I have little php experience. Today, I setup the database and
uploaded the data into a table. Am now sorting through the php
actions on actionforge.com.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Mar 9, 2011, at 8:20 PM, Walter Lee Davis wrote:

and Generate to create a working application from your data in a few
clicks:

GitHub - walterdavis/myactiverecord: Fork of MyActiveRecord by Jake Grimley

Should be https://github.com/walterdavis/generate

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,
Two books, new actions and hand coding. Doesn’t feel very hopeful or fast. I have already setup and uploaded my data into a mysql database via my host c-panel. What’s wrong the the freeway php actions? I have read through your github.com info. Very intimidating. Any templates I could check out?

Thanks Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The Actions encourage (can’t be made to work any other way) a very
sloppy coding practice known as “spaghetti code” in the trade. What
this means is that you have HTML and business logic mixed together in
the same file. While this will work, it leads to difficult-to-read
code, and mistakes, usually in that order.

I made a screencast showing off the magic that is Generate, you can
see it here: http://freewaycast.com/screencasts/view/85-generate-a-database-application

If you just want to get a table of data to show on the screen, all you
need to do is this:

  1. Make sure that your database table has an auto-incrementing primary
    key with the name ‘id’. Make note of the name of your table, I’ll call
    it ‘widgets’ here.

  2. Make a new blank page in your Freeway document called listing.php
    (or whatever.php).

  3. Apply the PHP Use Include Pages Action to your page. PHP Use Include Pages - ActionsForge

  4. Using a programmer’s text editor, create a text file named
    include.php and put the following code into it:
    gist:864492 · GitHub
    You’ll need to edit that to reflect your actual table and database
    names, along with the username and password your hosting provider gave
    you to access your database server. If your database hostname isn’t
    localhost, change that part of the first line to match, too.

  5. Using the PUIP Action interface, attach the MyActiveRecord.php file
    (downloaded from Github here: GitHub - walterdavis/myactiverecord: Fork of MyActiveRecord by Jake Grimley
    – just push the big Download button on the right side of the page,
    then double-click the file to un-zip it, and locate the file
    MyActiveRecord.php in the resulting folder) followed by the
    include.php file you wrote and saved on your computer. They have to go
    in that order.

  6. From the main menu, choose Insert / Markup Item. You’ll see a
    little code box appear. Type in exactly this: <?php echo $out; ?>
    (but without the back-ticks you see surrounding that code if you’re
    viewing this in mail).

  7. Upload to the server, and browse to your page. If nothing has gone
    wrong (possible, even likely I’ve typed something wrong here – I’m
    famous for that) you should see a gigantic table on screen with every
    row of your database and every column in each row besides the auto-
    number ID.

This is as simple and self-contained an example as I can give you.

Once you get that part working, I can share some very simple code to
make the entire thing click-to-edit. Literally 10 or 15 more lines of
code and you can have Excel in a Web browser!

Walter

On Mar 10, 2011, at 11:51 AM, jan smoot wrote:

Walter,
Two books, new actions and hand coding. Doesn’t feel very hopeful or
fast. I have already setup and uploaded my data into a mysql
database via my host c-panel. What’s wrong the the freeway php
actions? I have read through your github.com info. Very
intimidating. Any templates I could check out?

Thanks Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

It’s slow going, but I have accomplished a lot today!

  1. I had already uploaded my data, and via your instructions, needed to add the primary key. Finally got that figured out.

  2. Following your screencast, I proceeded to download the generate folder and implemented what I could. I was able to verify the database connection with scaffold.php. I had an improper database name, which scaffold flagged. So, that was helpful.

  3. I have edited the gistfile.php for include in Freeway. Have not tested this out yet.

  4. My application does not call for just displaying the data, in fact, I need to create two other tables from the big data set. One is keyed on the State field. User will select a state from a pulldown, then table is built with summary information selecting only line items matching the state and summing the information in categories. The second table is a summation of a few fields in the data file, again broken into categories. Categories like 1-1000,1000-2000, 2000-5000, etc. ie Stores in Utah with 1-1000 widgets, etc. Any/All suggestions are helpful.

  5. I would be interested in the code you offer to edit the spreadsheet entries.

  6. I am making notes so that if/when I need to do something like this again, it won’t take days! Maybe just hours (and hours)

Thanks for your support. It helps make it possible. More to go! Last 10% always takes 90% of the time!

Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Mar 10, 2011, at 5:07 PM, jan smoot wrote:

  1. My application does not call for just displaying the data, in
    fact, I need to create two other tables from the big data set. One
    is keyed on the State field. User will select a state from a
    pulldown, then table is built with summary information selecting
    only line items matching the state and summing the information in
    categories. The second table is a summation of a few fields in the
    data file, again broken into categories. Categories like
    1-1000,1000-2000, 2000-5000, etc. ie Stores in Utah with 1-1000
    widgets, etc. Any/All suggestions are helpful.

There’s another way to look at this. These extra tables you want to
show are merely filtered results of a query against the database. So
the same exact table code would be used, but the initial query would
change from MyActiveRecord::FindAll('widgets') to
MyActiveRecord::FindAll('widgets','brand LIKE "foo"') to only return
the matching records. In your application, you would search on state LIKE "%' . $userStateEntry . '%"' to get a “fuzzy match” against
whatever they entered. The code I posted earlier could be modified to
have a default entry of “find everything” and then a filter builder to
come up with the restrictions to present the filtered list.

  1. I would be interested in the code you offer to edit the
    spreadsheet entries.

The way I have done this in the past is to include the tablekit[1]
JavaScript library, and then build a callback function that takes its
request and returns the edited result. In order for this to work, you
need to modify the table builder a little bit, so that each column of
the table has an ID to match its database column name, and each row
has an ID to match the primary key ID from that record. I’ll update
the Gist in a bit to include that. Once those variables are there to
be communicated to the server, it’s quite trivial to update the content:

Walter

http://millstream.com.au/view/code/tablekit


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Mar 10, 2011, at 5:38 PM, Walter Lee Davis wrote:

The way I have done this in the past is to include the tablekit[1]
JavaScript library, and then build a callback function that takes
its request and returns the edited result. In order for this to
work, you need to modify the table builder a little bit, so that
each column of the table has an ID to match its database column
name, and each row has an ID to match the primary key ID from that
record. I’ll update the Gist in a bit to include that. Once those
variables are there to be communicated to the server, it’s quite
trivial to update the content:

gist:865087 · GitHub

Walter

http://millstream.com.au/view/code/tablekit

A couple of things I left out of this. First, name that second Gist
file update.php, because that’s what the code I just added to the
first Gist tells tablekit to look for.

Second, after you download tablekit, you’ll also need to download
Prototype.js from http://prototypejs.org and use the External
JavaScript Action to add prototype.js (first) and tablekit.js (second)
to the head of your test page. Follow that up with a brief dip into
the Page /HTML Markup dialog, in the Before section, to add
the little script block I tacked on to the original Gist.

With all of those changes in place, you should be ready to click-to-
edit anywhere in your table.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s an example running live. This uses Tablekit for the in-cell
editing, but another separate form to do the deletes and adds.

http://scripty.walterdavisstudio.com/table/

Here’s where MyActiveRecord really sits up and works for a living.
This is the entire form handler, with a separate path for deletes and
saves:

if(isset($_POST['delete'])){
	if($widget =  
MyActiveRecord::FindById('widgets',key($_POST['delete']))){
		$widget->destroy();
		header('Location: index.php');
		exit;
	}
}
if(isset($_POST['save'])){
	$widget = MyActiveRecord::Create('widgets');
	$widget->populate($_POST);
	$widget->save();
	header('Location: index.php');
}

Walter

On Mar 10, 2011, at 5:49 PM, Walter Lee Davis wrote:

On Mar 10, 2011, at 5:38 PM, Walter Lee Davis wrote:

The way I have done this in the past is to include the tablekit[1]
JavaScript library, and then build a callback function that takes
its request and returns the edited result. In order for this to
work, you need to modify the table builder a little bit, so that
each column of the table has an ID to match its database column
name, and each row has an ID to match the primary key ID from that
record. I’ll update the Gist in a bit to include that. Once those
variables are there to be communicated to the server, it’s quite
trivial to update the content:

gist:865087 · GitHub

Walter

http://millstream.com.au/view/code/tablekit

A couple of things I left out of this. First, name that second Gist
file update.php, because that’s what the code I just added to the
first Gist tells tablekit to look for.

Second, after you download tablekit, you’ll also need to download
Prototype.js from http://prototypejs.org and use the External
JavaScript Action to add prototype.js (first) and tablekit.js
(second) to the head of your test page. Follow that up with a brief
dip into the Page /HTML Markup dialog, in the Before
section, to add the little script block I tacked on to the original
Gist.

gist:864492 · GitHub

With all of those changes in place, you should be ready to click-to-
edit anywhere in your table.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

I am on your step 5 above. I have both the MyActiveRecord.php and the include.php (configured correctly I think) identified via the PUIP action. I have Create Output Buffer checked and open with Finder (which is the default). I upload, and I see both the .php files being uploaded by freeway, but I don’t see them on the server and my .html (when I do view source) has almost nothing in it. I have the markup item with <?php echo $out; ?> in it. I did a publish everything.

Not sure what I’m doing wrong? So close! To getting to the hard stuff…writing the actual php to create these tables. Am sure it will be elegant once it is done. All for tonight. Thanks.

Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try this. First, un-check the output buffer – you won’t need it in
this case. Second, change Finder to BBEdit or TextWrangler or whatever
text editor you have installed. Now, to check to see if the Action is
doing what it should, first set your text editor as a browser, using
File / Preview in Browser / Browsers… (Simply add TextWrangler or
whatever you use there as if it was another browser.)

Now, back in your page, click on the Browser button in the top-right
of the screen, and choose your text editor as the browser. You should
see a little block of php code at the very top of the page – before
the DOCTYPE and opening HTML tag. There should be an include statement
for MyActiveRecord and another for your include page.

Walter

On Mar 11, 2011, at 12:54 AM, jan smoot wrote:

Walter,

I am on your step 5 above. I have both the MyActiveRecord.php and
the include.php (configured correctly I think) identified via the
PUIP action. I have Create Output Buffer checked and open with
Finder (which is the default). I upload, and I see both the .php
files being uploaded by freeway, but I don’t see them on the server
and my .html (when I do view source) has almost nothing in it. I
have the markup item with <?php echo $out; ?> in it. I did a
publish everything.

Not sure what I’m doing wrong? So close! To getting to the hard
stuff…writing the actual php to create these tables. Am sure it
will be elegant once it is done. All for tonight. Thanks.

Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Walter,

Got it! Am echoing the data. Unable to work on this for a while–another project calls me away, but hope to return to this later today. Thank you Walter for getting me this far!

I see the echo does not print the index id. Would be helpful to verify it is printing all the records–I have close to 8,000.

Next to try your php code out and see if I can create my tables and format them via my designers layout…

Jan


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That’s easy to fix, just comment out the outer test from this bit of
code – starts at line 10 in Gist:

if($key != 'id'){
	$out .= '<th id="' . $key . '">' . $key . '</th>'; //added column id
	$visible_columns[] = $key;
}

so it reads:

//if($key != 'id'){
	$out .= '<th id="' . $key . '">' . $key . '</th>'; //added column id
	$visible_columns[] = $key;
//}

What that will do is put all of the columns in the database on the
screen, because it will include ‘id’ in the $visible_columns array
instead of hiding it.

Walter
On Mar 11, 2011, at 10:02 AM, jan smoot wrote:

I see the echo does not print the index id. Would be helpful to
verify it is printing all the records–I have close to 8,000.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options