Lom
Новичок
Засовывание картинки и формат ячеек в Exel
генерю exel лист с помощью Spreadsheet_Excel_Writer
с вставкой данных и форматирование внешнего вида ячеек нет проблем
как только указать формат ячейки например числовой?
чтобы число 100 отображалось как 100.00
и не смог вставить в лист картинку
вставил к примеру
сперва попробовал всунуть gif
exel выдал ошибку
попытался bmp
но не помогло
может кто пробовал и смог это все таки сделать?
-~{}~ 22.11.05 15:04:
на сайте pear нашел вот такую фишку:
Bug #2862 insertBitmap scales image incorrect in Excel 2000
Description:
------------
In Excel 2000 a bitmap is always scaled incorrectly if
it is inserted via insertBitmap (and no scale/ position
attributes), regardless where I put the image.
The author of _positionImage in Worksheet.php notes that
"the SDK incorrectly states that the height should be
expressed as a percentage of 1024."
thus uses for the height a value of only 256.
I changed these values to 1024 which made the insert
work correctly for me.
Reproduce code:
---------------
только не понятно
это нужно менять значения в функции _positionImage в Worksheet.php или менять значения рисунка?
генерю exel лист с помощью Spreadsheet_Excel_Writer
с вставкой данных и форматирование внешнего вида ячеек нет проблем
как только указать формат ячейки например числовой?
чтобы число 100 отображалось как 100.00
и не смог вставить в лист картинку
вставил к примеру
PHP:
$sheet->insertBitmap(номер_строки,номер_столбца,путь_к_изображению);
exel выдал ошибку

попытался bmp
но не помогло
может кто пробовал и смог это все таки сделать?
-~{}~ 22.11.05 15:04:
на сайте pear нашел вот такую фишку:
Bug #2862 insertBitmap scales image incorrect in Excel 2000
Description:
------------
In Excel 2000 a bitmap is always scaled incorrectly if
it is inserted via insertBitmap (and no scale/ position
attributes), regardless where I put the image.
The author of _positionImage in Worksheet.php notes that
"the SDK incorrectly states that the height should be
expressed as a percentage of 1024."
thus uses for the height a value of only 256.
I changed these values to 1024 which made the insert
work correctly for me.
Reproduce code:
---------------
PHP:
$file = "/path/to/file/bitmap.bmp";
$worksheet->insertBitmap(0, 0, $file);
это нужно менять значения в функции _positionImage в Worksheet.php или менять значения рисунка?