Coder Social home page Coder Social logo

php-excel's People

php-excel's Issues

Filename is not escaped and therefore is a potential problem

What steps will reproduce the problem?

When using $xml->generateXML($filename) the filename is used without proper
validation of allowed characters. This may cause errors when delivering out
the file.

What is the expected output? What do you see instead?

Use a whitelist filter to correct the filename before sending out the files.


Original issue reported on code.google.com by [email protected] on 10 Sep 2009 at 12:24

PHP excel xml report creating using loops

hello,
First, i want to thanks for author for very usefull code :).
I sow problem and can't fix it.

when i use loop like this
for ($i=1; $i<5; $i++){
echo"<Row><Cell ss:StyleID=\"s52\"><Data ss:Type=\"String\"> 
</Data><NamedCell ss:Name=\"Print_Area\"/>$i</Cell></Row>";
}
everthing generate ok, but if i use

for ($i=1; $i<11; $i++){
echo"<Row><Cell ss:StyleID=\"s52\"><Data ss:Type=\"String\"> 
</Data><NamedCell ss:Name=\"Print_Area\"/>$i</Cell></Row>";
} 
everthing is stoping and broke excel report generation. How need to fix it?

please help..

thanks in advance

Original issue reported on code.google.com by [email protected] on 5 Aug 2007 at 10:48

Formulas?

I can't see a way to pass formulas to excel. Without this, it is of very
limited use.

Original issue reported on code.google.com by [email protected] on 21 Mar 2007 at 7:35

htmlentities function doesn't work

What steps will reproduce the problem?
1. Send a value with character "ñ" to AddRow method


What is the expected output? What do you see instead?
I expect the correct word "compañia"
I see a blank value 


What version of the product are you using? On what operating system?
excel-class 1.1
php 5.2.x
osx leopard 10.5.8


Thanks!

Original issue reported on code.google.com by [email protected] on 29 Sep 2009 at 3:00

Internet Explorer 7 compatibility issue

I came across a major compatibility issue with Internet Explorer 7 and
Microsoft Office 2007/3.

Headers sent cause IE to try to open the file inline but for the 90% of
tests the content was corrupted or IE was unable to handle the file.
I fixed the problem changing content disposition header to attachment

header("Content-Disposition: attachment; filename=\"" . $filename . ".xls\"");

and with 2 additional headers that force the browser to not cache the request.
Here's the final piece of code


        // deliver header (as recommended in php manual)
        header("Content-Type: application/vnd.ms-excel; charset=UTF-8");
        header("Expires: 0");
        header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
        header("Content-Disposition: attachment; filename=\"" . $filename .
".xls\"");

Original issue reported on code.google.com by [email protected] on 11 Jul 2007 at 12:14

utf8_encode of cyrillic characters

What steps will reproduce the problem?
1. input cyrillic characters in the array
2. save the file as UTF-8
3. run it

What is the expected output? What do you see instead?
xls file - the text is corrupt

What version of the product are you using? On what operating system?
php-excel Version 1.0

Please provide any additional information below.
Try without utf8_encode(); I guess the strings in the array "should" be
UTF-8 and utf8_encode() is not necessary.

Original issue reported on code.google.com by [email protected] on 20 Sep 2007 at 10:28

today timeline

What steps will reproduce the problem?
1. call
2. text
3. drive

What is the expected output? What do you see instead?
duplicate

What version of the product are you using? On what operating system?

xp
Please provide any additional information below.
yes

Original issue reported on code.google.com by [email protected] on 4 Mar 2015 at 11:43

Implode() doesn't work well with large arrays

What steps will reproduce the problem?
1. Generate a very large Excel file (>7000 lines) 

What is the expected output? What do you see instead?

You'll most likely get:

Allowed memory size of 16777216 bytes exhausted (tried to allocate 189
bytes) class-excel-xml.inc.php on line 188

I fixed this by changing the implode() line on 188 to the following for-loop:

        $length = count($this->lines);
        for($i=0; $i<$length; $i++) {
            echo $this->lines[$i] ."\n";
        }

Original issue reported on code.google.com by spamprotection on 12 Jun 2007 at 9:47

Suggestion

Change private $header to

"<?xml version=\"1.0\" encoding=\"%s\"?\>\n
<?mso-application progid=\"Excel.Sheet\"?>\n
<Workbook xmlns:o=\"urn:schemas-microsoft-com:office:office\"
 xmlns:x=\"urn:schemas-microsoft-com:office:excel\"
 xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"
 xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\">";

Change header to
header("Content-Type: application/force-download; charset=" . $this->sEncoding);

header("Content-Disposition: inline; filename=\"" . $filename . ".xml\"");

Now a download dialog will appear, click open, Excel will display the XML 
without any messages.

Original issue reported on code.google.com by [email protected] on 27 Mar 2011 at 6:37

Attachments:

Save to file

Can you post any way to save to file not stream?

Original issue reported on code.google.com by [email protected] on 31 Dec 2012 at 6:30

XML entities are not encoded

What steps will reproduce the problem?
1. put text containing an: ampersand, apostrophe, double-quote, less-than
and/or greater-than in the data for a cell.
2. Excel will fail to read the resulting file, complaining that illegal XML
characters are found.

Please provide any additional information below.

Text in cells must be XML encoded using:
str_replace('&#039;', '&apos;', htmlspecialchars($text, ENT_QUOTES));


Original issue reported on code.google.com by [email protected] on 28 Oct 2008 at 9:29

DRY: PHP-Excel project

A similar module exists elsewhere:

http://phpexcel.codeplex.com/

Consider merging the projects or at least sharing relevant code. HTH.

Original issue reported on code.google.com by [email protected] on 5 Aug 2010 at 5:35

Worksheet::removeColumn() not handling the last row of the worksheet?

What steps will reproduce the problem?
I have a script that's sole purpose is to remove a few columns from a
spreadsheet that is passed to it.  The total work w/ PHPExcel is:

$xl = PHPExcel_IOFactory::load($filename);
$ws = $xl->getSheet();
$ws->removeColumn('C', 7);
$writer = PHPExcel_IOFactory::createWriter($xl, 'Excel5');
$writer->save($outputfile);

After running the xls through the script, the final row still has the
columns that should be removed and I have to remove the data from those
cells manually.

What is the expected output? What do you see instead?
I would expect that the columns removed would be removed throughout the
entire worksheet.

What version of the product are you using? On what operating system?
PHP 5.2.9
Initially used PHPExcel 1.1
Most recent test using PHPExcel svn pull on 1/21/2010


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 22 Jan 2010 at 4:28

PHP-excel can not export variable with value of 254 length

What steps will reproduce the problem?
1. XML format 
<proejctName>XYZ</projectName>
<details>Add any 254 characters length string here</details>
2. sendFile() function sends data to xls file, but when you open a file it show 
File Error: Data ma have been loss 

for 253 character long string it works perfectly well..

What is the expected output? What do you see instead?
Expected o/p show print 254 charastre string in xls


What version of the product are you using? On what operating system?
v1.1

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 27 Feb 2012 at 5:42

Open xls file still loading...

What steps will reproduce the problem?
1. Open xls file
2.
3.

What is the expected output? What do you see instead?

When i downloaded xls file. I open it with MS Office but still loading...

What version of the product are you using? On what operating system?
Im using MS office 2007 2010 and 2013 to open but still loading and can't open 
file. I try to open with notepad++ and see XML struct as i need. But can't open 
by MS Excel T_T.

Please provide any additional information below.

Please help me.
Thank alot!

Original issue reported on code.google.com by [email protected] on 6 May 2013 at 10:41

decode for the newline in the cell

I added this code on the next line of 132(after htmlentities function)

$v = str_replace("\n", '&#10;',$v );

so that you can make newline in the cell data.

Original issue reported on code.google.com by [email protected] on 6 Oct 2011 at 6:58

Nothing happens when launching the code inside test.php in another php page

What steps will reproduce the problem?
1. Copy test.php's code into the page I created below
2. Launch the page 
3. Nothing appears

What is the expected output? What do you see instead?
The arrays contain data but nothing happens. I am able to print_r($excelSheet) 
and confirm it 
contains data. I have also used the test.php code to confirm it is not my array 
that is the issue. It 
is really puzzling - even if I copy paste the test.php code, and made sure that 
the class file is in 
the same folder, nothing appears. The rest of my page functions as expected.  

What version of the product are you using? On what operating system?
Latest version (the 2009 build)

Please provide any additional information below.
Please see attached file

Original issue reported on code.google.com by [email protected] on 10 Dec 2009 at 3:18

Attachments:

fix Number Stored as Text error

What steps will reproduce the problem?
1. add some rows that have numbers in them
2. download
3. Excel gives Number Stored as text error.

What is the expected output? What do you see instead?
Excel gives Number Stored as text error.

What version of the product are you using? On what operating system?
1.0 on Mac OSX.

Please provide any additional information below.
Here is my fix:

        foreach ($array as $k => $v):
            $ssType = "String";
            if(is_numeric($v)) {
                $ssType = "Number";
            }
            $cells .= "<Cell><Data ss:Type=\"".$ssType."\">" .
utf8_encode($v) . "</Data></Cell>\n"; 

        endforeach;




Original issue reported on code.google.com by [email protected] on 1 Oct 2007 at 4:19

file format does not match extension

When opening the generated file with Excel 2010, it pops up a window saying 
"The file you are tring to open is in a different format than specified by the 
file extension ... Do you want to open the file now?"

When clicking yes, it works fine, however, this should really be avoided. Also, 
with LibreOffice the opening of the file without any renaming is not possible.

Thank you

Original issue reported on code.google.com by [email protected] on 20 Nov 2012 at 7:27

Open Office

Open the dowloaded File into Open Office

Instead of a Excel Spread Sheet, It looks like a word Doc

v1.0, PHP 5, WinXP (Apache/PHP server as well)



Original issue reported on code.google.com by [email protected] on 27 Jul 2007 at 6:17

Improvements: Using a debugger to measure performance

I need to use a debugger (or something) to measure the performance of the
class methods. I am too unsure to decide whether I use array_slice or a for
loop to resize an array which is possibly too large to handle.


Original issue reported on code.google.com by [email protected] on 10 Sep 2009 at 4:17

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.