All,
What I need here, on a conceptual basis, code wise is:
Code:
function read_xcel($myfile,$mysheet) {
$objReader = new PHPxl_Reader;
$objPHPxl = $objReader->load($myfile);
$objSheets = $objReader->getActiveSheets();
$objActiveS = $objReader->setActiveSheet($objSheets);
$objRange = $objReader->SheetRange($objActiveS);
foreach ($objRange as $cell) {
$cellval = array($cell,$objReader->Cell->Value);
}
print_r($cellval);
}
Which should give me an array I can parse into MySQL then once I massage all in MySQL I then need something like this:
Code:
function write_xcel($myfile,$mysheet) {
$objWriter = new PHPxl_Writer;
$objPHPxl = $objWriter->load($myfile);
$objActiveS = $objWriter->setActiveSheet($mysheet);
$sql_str = "SELECT * FROM mydbtable WHERE datatype='data';";
$result = mysql_query($sql_str);
while ($row = mysql_fetch_assoc($result)) {
$rwcl = $row['row_col'];
$rcdt = $row['datasource'];
$res = $objWriter->SetCell($rwcl,$rcdt);
}
$objWriter->Close;
}
If I can get an example that works like these two hypothetical functions then I can make it all work.
Thanks!
OMR