Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 947741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:07:47+00:00 2026-05-15T23:07:47+00:00

I am using a PHP library PHPExcel in my script. Now the library is

  • 0

I am using a PHP library PHPExcel in my script. Now the library is very large nearly around 7MB and I dont think I am using all the features of it. I wish to make my script lightweightby delting the files in PHPExcel which I am not using.

How to achieve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:07:48+00:00Added an answer on May 15, 2026 at 11:07 pm

    PHPExcel uses an autoloader that only includes the files that your script actually uses, so the actual “in memory” size of the script is kept to a minimum.

    If you’re not using any language other than English, then you can delete all the subdirectories in Classes/PHPExcel/locale… if you want another locale such as French, then you can delete all subdirectories except fr (saving about 0.5MB).

    However, I wouldn’t recommend deleting anything else… especially without knowing exactly what you need.

    If disk space is absolutely critical, and you’re only working with (for example) xls files, then you could delete all the other readers and writers (note that the PDF writer uses the HTML writer); but you must then explicitly identify which reader or writer you’re going to use when reading rather than relying on the IOFactory’s autodetect:
    so explicit syntax:

    $objReader = PHPExcel_IOFactory::createReader('Excel5');
    $objPHPExcel = $objReader->load("excel5File.xls");
    

    should be used instead of

    $objPHPExcel = PHPExcel_IOFactory::load("excel5File.xls");
    

    If you don’t need the PDF writer, then deleting Classes/PHPExcel/Shared/PDF (tcpdf) will save about 4.5MB of disk

    However, I’d be reluctant to make any guarantees that you wouldn’t run into problems somewhere.

    If you really need to shrink the size on disk, then stripping out comments from the code is going to reduce the size quite drastically… I’m sure there are scripts available that will do this.

    EDIT

    Paul Dixon’s response to this question on stripping comments from a script might help minify to code on disk.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 513k
  • Answers 513k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If your Class field is only populated with integers, try:… May 16, 2026 at 5:51 pm
  • Editorial Team
    Editorial Team added an answer yes all varchar require a max size. May 16, 2026 at 5:51 pm
  • Editorial Team
    Editorial Team added an answer You can specify: DataKeyNames="PhotoId,AlbumId" Update: It looks like the DataList… May 16, 2026 at 5:51 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Can anyone reccomend a good library for reading xlsx files using php? ive looked
I'm wrapping a C++ library in PHP using SWIG and there have been some
I am using the FPDF library for generating PDF files by PHP. This library
I just recently started using this library (the one from CodePlex), but I ran
Let me rephrase my last question, what PHP library or framework can I use
I've convinced my boss to do the typesetting stuff using PHP(PHP Version 5.2.8). And
I'm doing a project for a college class I'm taking. I'm using PHP to
I'd like to embed code from my SVN repository into my website, using PHP.
I'm creating a PHP library for a third-party site's REST API. The library will
For example using this Wikipedia dump: http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=lebron%20james&rvprop=content&redirects=true&format=xmlfm Is there an existing library for Python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.