I am humbly requesting your opinions in an issue that is driving me crazy...
I currently maintain a few "Financial" websites. This sites are simply used to display stock data from the day before. We get the prices in an Excel sheet.

Is there a way to parse the spreadsheet's cells and extract the value of five cells inside this spreadsheet and update a PHP based site (running a CMS)?

ANY (and I mean A N Y) ideas or suggestions will be greatly appreciated.

Thank

Hi,

Only way I could think of is by saving the excel sheet in CSV format and opening it in PHP and retrieving the value using the fgetcsv() function.

Here is an example... I just wrote this on the fly and it may have some mistakes
ex:

$file = fopen("test.csv", "r"); 

while($line = fgetcsv($file))  //extracted 1 row
{
   echo $line[0] . '<br />'; //column 1
   echo $line[1] . '<br />'; //column 2
   echo $line[2] . '<br />'; //column 3
   echo $line[3] . '<br />'; //column 4
   echo $line[4]; //column 5
}

fclose($file);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.