Re: [PHP] Spreadsheet_Excel_Reader problem
[email protected] (Jochen Schultz)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
Or maybe you want to check out this:
http://www.codeplex.com/PHPExcel
I havn't checked it out for your special purpose but i found it useful
for some other jobs (especially excell 2007 support).
regards
Jochen
Ashley Sheridan schrieb:
> On Tue, 2010-03-16 at 20:16 +0800, I am on the top of the world!
> Borlange University wrote:
>
>> i have a problem of reading values from excel file via
>> spreadsheet_excel_reader which is a php class used to manipulate excel
>> files.
>>
>> $data = new Spreadsheet_Excel_Reader();
>> $data->setOutputEncoding('CP936');
>> $data->read("d:\\tmp.xls");
>> $rows=$data->sheets[0]['numRows'];
>> $cell = $data->sheets[0]['cells'][1][1];
>>
>> if i type many rows,say 1000, in the tmp.xls, it can read, $rows shows 1000,
>> however, 1000 rows of data are copied from another excel file and these
>> cells may have different background or other changes that differ from normal
>> cells, it fails to read.the variable $rows shows nothing....what i can do
>> now is to split these data into small groups, small enough to be read, it
>> really takes plenty of time.
>>
>>
>> i dont know why, has somebody met this problem ever?
>
>
> If it's just the data you need, try using a csv file instead. The Excel
> format is closed, and as such, the PHP classes won't have full support
> for all of it's features. It seems like formatting is causing the data
> to be written to the spreadsheet differently maybe.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
--
Sport Import GmbH - Amtsgericht Oldenburg - Tel: +49-4405-9280-63
Industriestrasse 39 - HRB 1202900 -
26188 Edewecht - GF: Michael MÃŒllmann