PHPExcel FatalError on reading cell with formula - phpexcel

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();

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?

I have error in giving background in Android studio by giving value android:background="11000000" my terminal error is posted below

/Users/adityamnaik/AndroidStudioProjects/Alvas/app/build/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
--custom-package\
com.example.adityamnaik.alvas\
-0\
apk\
--preferred-density\
560dpi\
--output-text-symbols\
/Users/adityamnaik/AndroidStudioProjects/Alvas/app/build/intermediates/symbols/debug/R.txt\
--no-version-vectors
Output: /Users/adityamnaik/AndroidStudioProjects/Alvas/app/src/main/res/layout/activity_main.xml:11: error: '11000000' is incompatible with attribute android:background (attr) reference|color.
/Users/adityamnaik/AndroidStudioProjects/Alvas/app/src/main/res/layout/activity_main.xml:26: error: '11000000' is incompatible with attribute android:background (attr) reference|color.
error: failed linking file resources.

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 $objDrawing Fatal Error

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")));
}

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