You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I am very new to this so please any1 that can help it would be much
appreciated.
I have been looking for ages now for a reader i found this google one which
works but i have a xls file workbook with multiple sheets. Im trying to
modify this code to get it to look between the sheets if that makes sense?
Please note the below works!! just need help on how to make it do what i
need it to. I would like to be able to get it to cross search/read the
workbook (sheets).
Any help would be much appreiciated
I have attached all 3 files.
example.php
<?php
error_reporting(E_ALL ^ E_NOTICE);
require_once 'excel_reader2.php';
$data = new Spreadsheet_Excel_Reader("book1.xls");
?>
<html>
<head>
<style>
table.excel {
border-style:ridge;
border-width:1;
border-collapse:collapse;
font-family:sans-serif;
font-size:12px;
}
table.excel thead th, table.excel tbody th {
background:#CCCCCC;
border-style:ridge;
border-width:1;
text-align: center;
vertical-align:bottom;
}
table.excel tbody th {
text-align:center;
width:20px;
}
table.excel tbody td {
vertical-align:bottom;
}
table.excel tbody td {
padding: 0 3px;
border: 1px solid #EEEEEE;
}
</style>
</head>
<body>
<?php
echo $data->dump(true,true);
?>
</body>
</html>
Original issue reported on code.google.com by [email protected] on 8 Aug 2009 at 8:22
Hi, if you want to dump/read a specific sheet, you need to pass an additional
parameter to the dump. Here is an example :
for ($SheetNum = 0; $SheetNum < count($data->boundsheets); $SheetNum++)
{
$SheetName = $data->boundsheets[$SheetNum]['name'];
echo "<p style='font-family:Verdana; font-size:24px; font-weight:bold;'>".
"Sheet # : ". $SheetNum. " - Sheet name : ". $SheetName. "</p>";
echo $data->dump(true,true, $SheetNum);
}
bye
Original issue reported on code.google.com by
[email protected]
on 8 Aug 2009 at 8:22Attachments:
The text was updated successfully, but these errors were encountered: