PHPExcel $objDrawing Fatal Error - phpexcel

I'm trying to open xlsx file (link), but get fatal error
Fatal error: Call to a member function attributes() on a non-object in
PHPExcel/Reader/Excel2007.php on line 1509
line 1509:
$objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($xfrm->ext->attributes(), "cx")));
If delete this row with $xfrm variable error does not appear.
For PHPExcel developers:
Below is the condition if( $xfrm ), maybe you need to include the
problematic line in the condition?
$objDrawing->setWidth(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($xfrm->ext->attributes(), "cx")));
$objDrawing->setHeight(PHPExcel_Shared_Drawing::EMUToPixels(self::array_item($xfrm->ext->attributes(), "cy")));
if ($xfrm) {
$objDrawing->setRotation(PHPExcel_Shared_Drawing::angleToDegrees(self::array_item($xfrm->attributes(), "rot")));
}

Related

filterAndTrim : Error in add(bin) : record does not start with '#'

I'm using dada 2 version ‘1.22.0’ on windows 10, i have list of compressed (.gz ) fastq files, when i use the function filterAndTrim i get this error message :
Error in add(bin) : record does not start with '#'
But when i want to see if i can read th .gz file with library(ShortRead) :
library(ShortRead)
fn <- "path/to/example.fastq.gz"
reads <- readFastq(fn)
it doesn't give any error message message
I don't understand why the function filterAndTrim give the error message
Error in add(bin) : record does not start with '#'
Do you have any solution?

Why do I encounter Fatal error in publishing a Responsive Pricing Table?

Once I hit publish in Add New pricing table I encounter this error:
Fatal error: Call to undefined function sanitize_hex_color() in /var/domains/main/wp-content/plugins/dk-pricr-responsive-pricing-table/inc/rpt-save-metaboxes.php on line 69
in WordPress version 4.6, this function has been moved to the file wp-includes/formatting.php, first include this file, and then call the function :
if ( ! function_exists( 'sanitize_hex_color' ) ) {
include ABSPATH . 'wp-includes/formatting.php';
}

how do i declare a dbms output variable on plsql?

I keep getting this error when trying to compile
[Error] PLS-00201 (159: 25): PLS-00201: identifier 'DMBS_UTILITY.FORMAT_ERROR_BACKTRACE' must be declared
Here's the faulty code:
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('STUDENT:'||V_STUDENT||
'Error Occured: '||SQLERRM ||CHR(10)||'['||
DMBS_UTILITY.FORMAT_ERROR_BACKTRACE|‌​|']');
...
As Gurwinder stated, you just have a typo in your code (DMBS_UTILITY instead of DBMS_UTILITY):
Try this:
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('STUDENT:'||V_STUDENT||
'Error Occured: '||SQLERRM ||CHR(10)||'['||
DBMS_UTILITY.FORMAT_ERROR_BACKTRACE|‌​|']');
...

PHPExcel FatalError on reading cell with formula

I read file cell by cell with getCalculatedValue().
When I read cell with the wrong formula I get Fatal Error:
Fatal error: Uncaught exception 'PHPExcel_Calculation_Exception' with
message 'Лист1!B291 -> Formula Error: An unexpected error occured' in
/PHPExcel/Cell.php:300 Stack trace: #0 /class_phpexcel.php(1145):
PHPExcel_Cell->getCalculatedValue()
Is there a way to avoid the Fatal Error and simply ignore the value of a cell?
Link to file: problem-cell-b291.xlsx (problem with cell B291)
Code:
require_once 'class_phpexcel.php';
$E = PHPExcel_IOFactory::load('problem-cell-b291.xlsx');
$E->getActiveSheet()->getCellByColumnAndRow(1, 291)->getCalculatedValue();

PHPExcel: Shows image file not found error in adding image to excel sheet

I am generating an excel report where there is a column for passport size images. I want to add the images to that column one by one as per the record fetch.
My code for adding the image to the sheet is this:
$columnID = getExcelColumnValue($dataColumn);
//$objPHPExcel->getActiveSheet()->getStyle($columnID . $dataRow)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);
$objDrawing = new PHPExcel_Worksheet_Drawing();
$objDrawing->setPath(BASE_URL.$value);
$objDrawing->setCoordinates($columnID . $dataRow);
$objDrawing->setHeight(36);
$objDrawing->setWorksheet($objPHPExcel->getActiveSheet());
the error is this:
Fatal error: Uncaught exception 'PHPExcel_Exception' with message 'File http://128.199.210.59/data_collection/v2/images/formData/554dfdb0252e89781b90416a/1431176847206615.jpg not found!' in /var/www/data_collection/v2/php/api/PHPExcel/Classes/PHPExcel/Worksheet/Drawing.php:114 Stack trace: #0 /var/www/data_collection/v2/php/processing/formDashboard/exportToExcel.php(110): PHPExcel_Worksheet_Drawing->setPath('http://128.199....') #1 {main} thrown in /var/www/data_collection/v2/php/api/PHPExcel/Classes/PHPExcel/Worksheet/Drawing.php on line 114
The image file is present at the destination, still it shows the error...

Resources