0

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

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by ashneet
0

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);
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.