Skip to main content
Announcements
Qlik Community Office Hours - Bring your Ideation questions- May 15th, 11 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

Export to excel

Hi guys,

My qlikview table are up on the server, it seems that when user export the table via excel, it does not export the table name.

is there anyway we can export the table name as well

Thanks

2 Replies
cesaraccardi
Specialist
Specialist

Hi,

When using the option "Send to Excel" (via IE Plugin) a new file will be created and named as:

<object ID>_YYYMMDD_HHmmss.xls

That means you can specify another ID for the table in order to change the name of the resulting file.

Cheers,

Cesar

markodonovan
Specialist
Specialist

Hi n1ef5ng1,

Are you using the IE plugin ?

If you mean you wish to export the name of the table into the excel spreadsheet you could do this using a macro such as the one below.

The only problem is making sure the module security is set to 'Give System Access to module script' using Ctrl+Shift+M in the document.  Fine for 1\2 users but might be a pain if you have a lot of users.

Sub ExcelExportWithTitle()

Set Doc = ActiveDocument

Set obj = Doc.GetSheetObject("CH13")

Set XLApp = CreateObject("Excel.Application")

XLApp.Visible = True

'Create a new excel worksheet

Set XLDoc = XLApp.Workbooks.Add

Set rngStart = XLDoc.Sheets(1).Range("A2")

Set XLSheet = XLDoc.Worksheets("Sheet1")

'Copy the table to Excel

obj.CopyTableToClipboard True

XLSheet.Paste rngStart

'Set the Caption value as the first row

XLSheet.Range("A1").Value = obj.GetCaption.Name.v

Set title = XLSheet.Range("A1")

'Resize the cells

XLDoc.Worksheets("Sheet1").Cells.Select

XLDoc.Worksheets("Sheet1").Cells.EntireRow.RowHeight = 12.75

XLDoc.Worksheets("Sheet1").Cells.EntireColumn.AutoFit

End Sub

Hope this helps.

Thanks

Mark

http://practical-qlik.com

https://twitter.com/PracticalQlik

http://practical-qlikview.tumblr.com/