XL.CopyContent
--------------

Copies all content from one book to other book.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [XL](component_XL.md) | [5.1](newinversion51.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "XL.CopyContent"; BookRef; otherBookRef { ; Options } ) 

**MBS**( **"XL.CopyContent";** /\* Copies all content from one book to other book. \*/  
**$BookRef**; /\* The reference number for the workbook.e.g. $ref \*/   
**$otherBookRef**; /\* The reference to the second workbook. Please use [XL.NewBook](XLNewBook.md) to create a file.e.g. $ref2 \*/   
**$Options**) /\* Optional; Which items to skip when copying content.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| BookRef | The reference number for the workbook. | $ref |  |
| otherBookRef | The reference to the second workbook. Please use [XL.NewBook](XLNewBook.md) to create a file. | $ref2 |  |
| Options | Which items to skip when copying content. | "" | Optional |

### Result

Returns OK or error.

### Description

Copies all content from one book to other book.  
  
The plugin loops through all sheets and creates matching sheets on new book.  
Formats and fonts are created on the fly.  
  
This allows you to convert from XLS to XLSX or back.  
Please report if something is not copied. Of course plugin can only copy what libXL supports, so things like movies or diagrams are not copied. And if you use demo mode, only a small part is copied with values. Rest will be blank.  
  
| Option | Description. |
|---|---|
| SkipPictures | Don't copy pictures. |
| SkipMerges | Don't copy merged cells. |
| SkipNamedRanges | Don't copy named ranges. |
| SkipPrintArea | Don't copy print area. |
| SkipPrintRepeat | Don'T copy print repeat |
| SkipPrintFit | Don't copy print fit. |
| SkipHorPageBreak | Don't copy horizontal page breaks. |
| SkipComments | Don't copy cell comments. |
| SkipFormats | Don't copy formats. |
| SkipRowHidden | Don't copy hidden rows. |
| SkipColHidden | Don't copy hidden columns. |

### See also

- [XL.NewBook](XLNewBook.md)

### Release notes

- **Version 9.0**
    - Added options for [XL.CopyContent](http://www.mbsplugins.eu/XLCopyContent.shtml), [XL.CopyRow](http://www.mbsplugins.eu/XLCopyRow.shtml), and [XL.CopySheet](http://www.mbsplugins.eu/XLCopySheet.shtml) to skip some content.

### Example Databases

- [XL/Converter](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/Converter.shtml#1ScriptAnchor_)

### Blog Entries

- [LibXL for FileMaker with extras](https://www.mbsplugins.de/archive/2021-03-02/LibXL_for_FileMaker_with_extra/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.0pr7](https://www.mbsplugins.de/archive/2019-01-05/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 9.0pr6](https://www.mbsplugins.de/archive/2019-01-02/MBS_FileMaker_Plugin_version_9/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 5.1pr1](https://www.mbsplugins.de/archive/2015-03-16/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2025, Seite 27](https://filemaker-magazin.de/neuigkeit/4282-Appetithappen-FMM_202501)

This function checks for a license.

Created 11st March 2015 , last changed 2nd January 2019

  
[XL.CopyColumn](XLCopyColumn.md) - [XL.CopyRow](XLCopyRow.md)

[HTML Version](XLCopyContent.shtml)