XL.CopyColumn
-------------

Copies cells from one column to another column.

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

MBS( "XL.CopyColumn"; bookRef1; bookRef2; sheetIndex1; sheetIndex2; SourceCol; DestCol { ; Options } ) 

**MBS**( **"XL.CopyColumn";** /\* Copies cells from one column to another column. \*/  
**$bookRef1**; /\* The reference to the source workbook. Please use [XL.LoadBook](XLLoadBook.md) to load a file.e.g. $ref \*/   
**$bookRef2**; /\* The reference to the destination workbook. Please use [XL.LoadBook](XLLoadBook.md) to load a file.e.g. $ref \*/   
**$sheetIndex1**; /\* The source index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$sheetIndex2**; /\* The destination index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1.e.g. 0 \*/   
**$SourceCol**; /\* The source col index.e.g. $scol \*/   
**$DestCol**; /\* The destination col index.e.g. $dcol \*/   
**$Options**) /\* Optional; Which items to skip when copying content.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| bookRef1 | The reference to the source workbook. Please use [XL.LoadBook](XLLoadBook.md) to load a file. | $ref |  |
| bookRef2 | The reference to the destination workbook. Please use [XL.LoadBook](XLLoadBook.md) to load a file. | $ref |  |
| sheetIndex1 | The source index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |  |
| sheetIndex2 | The destination index of the sheet. This number ranges from 0 to [XL.Book.SheetCount](XLBookSheetCount.md)-1. | 0 |  |
| SourceCol | The source col index. | $scol |  |
| DestCol | The destination col index. | $dcol |  |
| Options | Which items to skip when copying content. | "" | Optional |

### Result

Returns OK or error.

### Description

Copies cells from one column to another column.  
Source and destination can be in different sheets/books.  
This copies most properties and all cells.  
If something is missing, please let us know.  
  
| 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. |

### Examples

Copy 3rd column to 5th:

 Set Variable \[ $r ; Value: MBS ( "XL.CopyColumn"; $bookRef ; $bookRef ; $sheet ; $sheet ; 2; 4 ) \]  
### See also

- [XL.Book.SheetCount](XLBookSheetCount.md)
- [XL.LoadBook](XLLoadBook.md)

### Release notes

- **Version 15.2**
    - Fixed [XL.CopyCellValue](https://www.mbsplugins.eu/XLCopyCellValue.shtml), [XL.CopyColumn](https://www.mbsplugins.eu/XLCopyColumn.shtml) and [XL.CopyRow](https://www.mbsplugins.eu/XLCopyRow.shtml) to work if second document has more sheets.
- **Version 10.5**
    - Added [XL.CopyColumn](https://www.mbsplugins.eu/XLCopyColumn.shtml) function.

### Blog Entries

- [MBS FileMaker Plugin, version 15.2pr5](https://www.mbsplugins.de/archive/2025-04-22/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [LibXL for FileMaker with extras](https://www.mbsplugins.de/archive/2021-03-02/LibXL_for_FileMaker_with_extra/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 10.5](https://www.mbsplugins.de/archive/2020-11-23/New_in_MBS_FileMaker_Plugin_10/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 10.5 - Über 6400 Funktionen in einem Plugin](https://www.mbsplugins.de/archive/2020-11-17/Neues_MBS_FileMaker_Plugin_105/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 10.5 - More than 6400 Functions In One Plugin](https://www.mbsplugins.de/archive/2020-11-17/MBS_FileMaker_Plugin_105_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.5pr1](https://www.mbsplugins.de/archive/2020-10-01/MBS_FileMaker_Plugin_version_1/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 30th September 2020 , last changed 2nd April 2021

  
[XL.CopyCellValue](XLCopyCellValue.md) - [XL.CopyContent](XLCopyContent.md)

[HTML Version](XLCopyColumn.shtml)