Update mySQL data from Excel

Update mySQL data from Excel

am 12.01.2007 21:22:43 von roger.rigsby

Ok I know how to get the data I want from mysql but I need to actually
do something with this data and then send it back to mySQL.

Company heads love the spreadsheet view so this is serious business.

I've done what I could with tables and css and javascript and whatnot
for a makeshift datagrid on a webpage but since I'm using PHP and not
asp.net I have no idea how to create a datagrid.

So if anyone knows how to update data in Excel that has been pulled
from mySQL it would be GREAT.

Thanks.

Re: Update mySQL data from Excel

am 13.01.2007 03:57:30 von Carl Pearson

roger.rigsby@gmail.com wrote:
> Ok I know how to get the data I want from mysql but I need to actually
> do something with this data and then send it back to mySQL.
>
> Company heads love the spreadsheet view so this is serious business.
>
> I've done what I could with tables and css and javascript and whatnot
> for a makeshift datagrid on a webpage but since I'm using PHP and not
> asp.net I have no idea how to create a datagrid.
>
> So if anyone knows how to update data in Excel that has been pulled
> from mySQL it would be GREAT.
>
> Thanks.
>

Since you're working with Excel, let VBA help.

Instead of trying to show the data in the browser, you could try:
http://pear.php.net/package/Spreadsheet_Excel_Writer

If your spreadsheet is very complicated (which could make the above
difficult to implement), you could always have the server create a CSV &
use some code in your spreadsheet to import it.

Going the other way, you could use some VBA code to write out an update
query - saving it as a file - upload it to some space on the server
(perhaps with a shell to a command-line ftp, though that would be
sending the login credentials as plain-text), then shell out to a
browser call using the uploaded file name as a query string.