Read online data into Excel - from PHP server? - php

I want to connect Excel to my web site, as an external data source, and thereby run reports on the data that is fetched from my website. I have heard that this should be possible to do and Excel seems to support it, but I have little knowledge on how I actually should build the backend on my PHP server to serve the data. How do I do it?
I am well aware of the fact of being able to create and read Excel files on a PHP server, but that's not what I am after.

Excel supports IQY, internet queries.
You may define one in excel pointing at your webserver and get the data right into excel.
You may use formatted html-tables at your server. Colors will be preserved.
the iry-format is described at:
http://support.microsoft.com/kb/157482
and supports both post/get and parameters.
regards
//t

Related

Android local Db to XML to mySql via PHP.

I have an application with a local Sqlite database which stores records on the local phone. Now I want to increase functionality and I have come to the conclusion that I need a remote database and server based functionality to make my application more interactive. Also at this juncture I don't want my users to lose data due to this transformation. After research and lookup over the internet I came to know that I can achieve this by writing a web-service which will fetch records row by row and feed into my mySQL database. However I am confused about how to achieve this, do I convert the local databases into XML file(s) and POST them to my PHP where I parse them and feed into mySQL database or there is a better way or rather an API for this? I want a starting point, a heading. Thanks!
As you say, convert local db to XML or JSON and POST it to server. Do not forget use gzip when transfer.
You can upload the db file directly to server. Your db file locate in /data/data/app-package-name/databases. You should parse this db file in server.

Using Adobe Air or Flex to connect to a server/php file for database interaction

I will be developing an smartphone app (eg iOS) in either actionscript 3 with adobe air or using flex. However I need to connect to a database for a huge amount of data storage and retrieval. There is a tonne of information about local database storage, but not on an external server!
I have done some research, most leads me to dead ends or not to be what I need. I have heard that its safer to pass variables to a PHP file which then deals with the database stuff; however how can I send data from the actionscript file over to a server and target php file? I cannot seem to find this anywhere!
At the moment I do not have an code to show, I am trying to find the best solution. Thank you.
I think the best is not to just call php scripts, but to build a php based webservice.
You can achieve that by using AMFPhp
Please check the links below on what you can do and how.
http://cookbooks.adobe.com/post_AMFPHP___Flex_4_demo-16508.html
http://polygeek.com/530_video-tutorial_amfphp-video-tutorial-connecting-to-amfphp-and-returning-data-version-10
http://www.silexlabs.org/amfphp/

Interfacing PHP with an Excel spreadsheet / VBA Script

I have a client that has developed an Excel spreadsheet to calculate various statistics using VBA Script (Excel/VBA is not my forte to say the least). He wants me to create a web front-end for this (I will be using PHP / CakePHP) that will have a simple form for inputting cell values, will query the spreadsheet and return the values for display on the website.
The client does not want to convert the Excel/VBA script to another language - he wants to keep it in a 'silo' and just have the website query the existing script.
Is this possible? Any libraries that can help? How could I go about this?
You'd need to run MS Excel itself, and use COM... it's the only method of which I'm aware that would allow you to run VBAScript within the Excel workbook from your PHP. You couldn't even use OpenOffice for this, so it limits you to a Windows Server with MS Excel installed

Phonegap: populate local database with data from external server

I am writing an android application that needs to work both offline and online. In order to do that I need to get mysql database from external server and save that db to phones localdatabase so it can be read from there if user has no connection. Is it possible and if so, how can I do it?
Refer the following thread in which I have mentioned javascript frameworks which can be used to store data locally. The frameworks are using the standard local storage mechanism but they make it easier to store/retrieve and also make it portable across many platforms (this again depends on selection on the framework).
What to Use for PhoneGap Database Storage
Although you still need to load data from server.
This sounds like you need to write an API which does CRUD operations on a database.
There is no trivial way to simply do this directly with MySQL - you'll have to write one.
There are frameworks designed specifically for this, for example FRAPI: http://getfrapi.com/

how to upload files to PHP server with use of Python?

I was wondering is there any tutorial out there that can teach you how to push multiple files from desktop to a PHP based web server with use of Python application?
Edited
I am going to be writing this so I am wondering in general what would be the best method to push files from my desktop to web server. As read from some responses about FTP so I will look into that (no sFTP support sadly) so just old plain FTP, or my other option is to push the data and have PHP read the data thats being send to it pretty much like Action Script + Flash file unloader I made which pushes the files to the server and they are then fetched by PHP and it goes on from that point on.
I'm assuming you own the PHP server.
Use FTP. See here and here.
Make a file upload form with PHP, and use python to fill out the form. See this and this.
(Usually a bad idea) Use PHP to write small server that listens for data and then writes it to a file.
I think you're referring to a application made in php running on some website in which case thats just normal HTTP stuff.
So just look at what name the file field has on the html form generated by that php script and then do a normal post. (urllib2 or whatever you use)

Categories