
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Macro to merge cells doesn't work
Hello all!
I have a problem with my macro.
I'm trying to merge cell A1:J1. The solutions provided in our community didn't help.
May some of you can tell me what is wrong in my macro.
Thanks in advance!
sub ExExport
Set excelFile = CreateObject("Excel.Application")
excelFile.Visible = true
Set curWorkBook = excelFile.WorkBooks.Add
Set curSheet = curWorkBook.WorkSheets(1)
Set tableToExport = ActiveDocument.GetSheetObject("CH03")
Set chartProperties = tableToExport.GetProperties
tableToExport.CopyTableToClipboard true
chartCaption = tableToExport.GetCaption.Name.v
curSheet.Range("A1") = chartCaption
curSheet.Paste curSheet.Range("A2")
excelFile.Visible = true
curSheet.UsedRange.Columns.AutoFit
curSheet.UsedRange.Rows.AutoFit
excelFile.ActiveSheet.Range("A1:J1").Merge
excelFile.ActiveSheet.Range("A1:J1").HorizontalAlignment = xlCenter
excelFile.ScreenUpdating = True
end sub
Accepted Solutions
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is working in Desktop and not from QlikView Server, the issue is going to be the Export function/API, you need to use the Server-side API in that case:
ServerSideExportEx
You will find further information in the API Guide QVW file, which I have attached a version for you in case you do not have it.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is working in Desktop and not from QlikView Server, the issue is going to be the Export function/API, you need to use the Server-side API in that case:
ServerSideExportEx
You will find further information in the API Guide QVW file, which I have attached a version for you in case you do not have it.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
