Pear Spreadsheet_Excel_Writer question

Pear Spreadsheet_Excel_Writer question

am 10.08.2007 18:07:47 von Mike Miller

Hi,

I am using the Spreadsheet_Excel_Writer module from Pear to generate
Excel spreadsheets from my application. Currently I am finding that
when I create a new excel spreadsheet I get a message when opening the
file saying:

File error: Data may have been lost.

Not sure what this is caused by or how to rectify it. I am trying to
open the excel file with excel 2007.

M

Re: Pear Spreadsheet_Excel_Writer question

am 12.08.2007 09:35:54 von petersprc

Not sure why, do you need to set the version maybe:

$workbook->setVersion(8);

"This method exists just to access experimental functionality from
BIFF8. It will be deprecated ! Only possible value is 8 (Excel
97/2000). For any other value it fails silently."

http://www.go-pear.org/reference/Spreadsheet_Excel_Writer-0. 8/Spreadsheet_Excel_Writer/Spreadsheet_Excel_Writer_Workbook .html#methodsetVersion

On Aug 10, 12:07 pm, Mike Miller wrote:
> Hi,
>
> I am using the Spreadsheet_Excel_Writer module from Pear to generate
> Excel spreadsheets from my application. Currently I am finding that
> when I create a new excel spreadsheet I get a message when opening the
> file saying:
>
> File error: Data may have been lost.
>
> Not sure what this is caused by or how to rectify it. I am trying to
> open the excel file with excel 2007.
>
> M

Re: Pear Spreadsheet_Excel_Writer question

am 13.08.2007 09:41:43 von Toby A Inkster

Mike Miller wrote:

> File error: Data may have been lost.
>
> Not sure what this is caused by or how to rectify it. I am trying to
> open the excel file with excel 2007.

This isn't necessarily anything to do with PEAR. Search the MS website for
this error message. You'll find that it is produced in response to a
million different vague and untraceable conditions. :-(

Generally a good solution is to open the file in OpenOffice.org Calc,
copy and paste the data into a brand new spreadsheet and then use the new
spreadsheet instead.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 53 days, 11:19.]

PHP Debugging with Style -OR- How I Learned to Stop Worrying and Love the Bug
http://tobyinkster.co.uk/blog/2007/08/12/php-debugging-with- style/