+ Reply to Thread
Results 1 to 4 of 4

Help with a BUTTON to transmit data

Hybrid View

  1. #1
    Registered User
    Join Date
    03-11-2009
    Location
    Atlanta, Ga
    MS-Off Ver
    Excel 2003
    Posts
    2

    Help with a BUTTON to transmit data

    Hello all,

    I am out of my league, but in need of some help. I will try to be as brief as possible. I work for a law enforcement agency that has finally realized the benefit of data and statistics. Don't laugh, so are in the dark ages.

    I have written a very basic PHP website utilizing MySql to keep track of officers patrolling habits and locations. I created it because I was tasked with "doing it by hand" sifting through 125 logsheets daily and pulling out the data and putting it into excel. So I created this site for the officer to input the data I was looking for when they completed the patrols I was looking for. I wrote a few report generators to pull the data back out. All is good!

    Problem is they like it so much, they want more. They want all the data from all calls, but they want us to continue to use the "form" we have always used. Someone other than me created a very nice spreadsheet, that keeps up with every stat we collect.

    What I want to do is have a BUTTON on the bottom of the sheet that launches a script or something that will automatically create and send a CSV stream of the data or send the data DIRECTLY in some format that PHP can handle (csv,xml, or other) VIA some transport (HTTP POST or similar to a waiting PHP script on our dbserver. Does what I am asking make sense? Is it possible? Ideas?

    Don't get me wrong, if it was me, I would save the data to a CSV or XML file and then send it to the website, but I have to make this COP PROOF. Some of our law enforcement officers are not good at all with anything beyond typing in the form. Hence the need to send it directly with a push of a button. The secondary reason is the upper brass wants this sheet printed out as an archive backup and they want it to look like the form of old, so no creating a totally PHP driven website like I am currently doing.

    Any help or suggestions, code snippets are welcome.

    PS.. I cant send the data via GET as it will be longer than IE's limit of 2038 characters. We are standardized on IE for our in car laptops. Flame away

    Richard
    aka Nacman

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Help with a BUTTON to transmit data

    I'm not quite sure what is you're trying to do ... you say you want XL to post data to a php script - I'm curious as to what this script does ?

    If you're looking at means by which to update your MySQL db then you should probably look at ADO, ie get XL to write directly to the MySQL db.
    Last edited by DonkeyOte; 03-11-2009 at 02:39 PM.

  3. #3
    Registered User
    Join Date
    03-11-2009
    Location
    Atlanta, Ga
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Help with a BUTTON to transmit data

    Quote Originally Posted by DonkeyOte View Post
    I'm not quite sure what is you're trying to do ... you say you want XL to post data to a php script - I'm curious as to what this script does ?
    The PHP script primarily handles SOUNDEX comparisons. Again, officers can type anything in a "Location" Field. One might type Fielder Rd, another officer might type Fielder Blvd, or mispell Fielder. The Script handles lookups for those kinds of errors, and it also creates other fields, like a district and Landlot map area. These things the officer won't know, so I handle it programtically. Direct connection to the DB is an option but it will take a total rewrite of pulling the "unclean" data, clean it, then reinsert it.

    The current spreadsheet which is running on every laptop in a car, would be transmitted at the end of the work day when they came into range of the precincts and connect up via wifi. They would also be printed to a records printer over the network for the archive aspect.

    So what I am trying to do is send the worksheet data only over the internal network to an intranet site running Apache/PHP/Mysql.

    There has to be a way to take the spreadsheet and via VB or something and transmit the sheet data in csv, and send it to my PHP script.

    Richard
    aka Nacman

  4. #4
    Registered User
    Join Date
    05-20-2008
    MS-Off Ver
    2003 suite
    Posts
    64

    Re: Help with a BUTTON to transmit data

    I can't really help with the code stuff, but as far as the head honcho's wanting everything to look like it used to, I recommend creating what you want, then showing it to them. They have a fear of the unknown and all you have to do is show them something better, and you can't just talk about it. Real stuff means everything!

    My 2 cents.

    Good luck!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1