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

  • SEARCH
  • Home
  • 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 9014057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:25:07+00:00 2026-06-16T03:25:07+00:00

In my project I use symfony2 PHPExcel wrapper https://github.com/liuggio/ExcelBundle With the example from the

  • 0

In my project I use symfony2 PHPExcel wrapper https://github.com/liuggio/ExcelBundle

With the example from the link above I can create new excel files. However this file has no style or markup at all. So I created a excel template where I want to input some data.

I know how to load an excel file:

$excelObj = $this->get('xls.load_xls2007')
                 ->load($this->get('kernel')
                 ->getRootDir() . '/../web/excel-template.xlsx');

//custom modifications on excel file

Now I need to create a response. But in the doc of ExcelBundle there is no information on how to do that. They just show how response work for a excel file that is created by code.

I tried:

 $excelService->setExcelObj($excelObj);
 $response = $excelService->getResponse();
 //the rest is equal to the code in the doc

but it gives me a blank excel document.

Any ideas how to make a response with a loaded excel file?

  • 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-06-16T03:25:08+00:00Added an answer on June 16, 2026 at 3:25 am

    you can do this by

    // Read the file
        $objReader = PHPExcel_IOFactory::createReader($fileType);
        $objPHPExcel = $objReader->load($fileName);
    
        // Change the file
        $objPHPExcel->setActiveSheetIndex(0)
                    ->setCellValue('A1', 'Hello')
                    ->setCellValue('B1', 'World!');
    
        // Write the file
        $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $fileType);
        $objWriter->save($fileName);
    

    if you dont understand please comment..

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

Sidebar

Related Questions

symfony: http://www.symfony-project.org pjax: https://github.com/defunkt/jquery-pjax Hi all, I'm trying to use pjax in symfony in
Is it possible to use Twig in Silex from Symfony2 project instead from the
In a Symfony2 project, when you use a Controller , you can access Doctrine
I use Capifony to deploy my Symfony2 project to the production server. As a
For my project I use rake test for testing my libs. For example, I've
I use Doctrine2 as ORM in a Symfony2 project. I have article and tag
I use twig for templating in a multilingual Symfony2 project. There is a language
I have added the translator service for my Symfony2 project. I use it both
I have a Symfony2 project which uses composer, and I'd like to use this
I am trying to use a custom password encryptin in my symfony2 project. I

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.