php - How can I join Excel documents using PHPExcel? -


I am using dynamically to generate order receipts.

I want to be able to generate a "summary" excel file containing all the order receipts (per worksheet).

Is there a way to join one of two (or more) Excel documents with PHPExcel?

In Excel, the "tab" is known as "worksheets" in PHPExcel With Excel can create a workbook.

For reference, there is one more answer on SO.

An example of adding an external sheet is not sure if all naming dances are required. (CodePllex Link encourages you to clone the worksheet and copy the clone sheet so that it is not removed from the original workbook, but I do not think this will be a problem unless you are writing output to the source workbook.) It seems that something like this should be done:

  function getReceiptWorksheet ($ receipt number) {// Do something here to retrieve & amp; Return your current receipt} function vsmasterworcbook ($ filename, $ receipt number) {$ workbook = new PHPExcel (); Foreign Currency ($ Receipt Number as Receipt Number) {$ Worksheet = Match RECTbook Worksheet ($ Receipt Number) $ Workbook-> Advanced Sheet ($ worksheet); } $ ObjWriter = new PHPExcel_Writer_Excel2007 ($ workbook); $ ObjWriter- & gt; Save ($ filename); }   

Then you can simply call createMasterWorkbook ('receipts.xlsx', array (1, 2, 3)); .

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -