Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Heading in Straight table

Hi All,

How can i create a Heading for the straight table like.




Volume YTD JulyO/s
CodeDetailsLocation20112012GrowthDec-11Sep-11Sep-12NOC%Var

Attach is a sample example.

Thanks

Ritul

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

I hope below script helps u.

Sub Export

Path = "E:\"

FileName = "Export1.xlsx"

FullPath=Path&FileName

Set objFSO = CreateObject("Scripting.FileSystemObject")

if objFSO.FileExists(FullPath) then

objFSO.Deletefile FullPath

End if

set XLApp = CreateObject("Excel.Application")

XLApp.Visible = False

set XLDoc = XLApp.Workbooks.Add

txt1=ActiveDocument.GetSheetObject("TX02").GetText

txt2=ActiveDocument.GetSheetObject("TX03").GetText

XLDoc.Sheets(1).Cells(1,1).Value=txt1

XLDoc.Sheets(1).Cells(1,3).Value=txt2

'XLDoc.Sheets(1).Paste()

XLDoc.Sheets(1).Range("A1:B1").Merge

XLDoc.Sheets(1).Range("C1:D1").Merge

XLDoc.Sheets(1).Range("A2").Select

ActiveDocument.GetSheetObject("CH03").CopyTableToClipboard true

XLDoc.Sheets(1).paste()

'ActiveDocument.GetSheetObject("CH03").CopyTableToClipboard true

'XLDoc.Sheets(1).paste()

XLDoc.Sheets(1).Name = "Export"

XLDoc.SaveAs Path & FileName

XLDoc.Close

MsgBox("Success!")

XLApp.Quit

end sub

PFA ...

Regards

Kabilan K.

View solution in original post

6 Replies
Not applicable
Author

Simple solution is to hide the heading of the straiht table and add the required headings as labels (text Object) on top Straight table

Hope this helps

Regards

Mallik

Not applicable
Author

Hi,

Thanks, But i have to take report from this as send to excel option. The suggestion that you provide on that send to excel option hides.

Let me know how this could be achieve

Thanks

Not applicable
Author

Hi

The workaround is to write a macro on click of button to export the Text obj and Straight table as well,but i am not sure on export how would be the alignment in excel

Give a try

Regards

Mallik

Not applicable
Author

Hi,

Thanks can you provide any macro code for send to excel.

Thanks

Ritul

Not applicable
Author

The link below could be help ful to you but you need to customise according to your need

http://www.qlikblog.at/971/qliktip-32-exporting-multiple-objects-single-excel-document/

http://quickdevtips.blogspot.in/2012/06/qlikview-macro-how-to-export-multiple.html

also search in qlikview community, you will get lots of post on this.

Not applicable
Author

Hi,

I hope below script helps u.

Sub Export

Path = "E:\"

FileName = "Export1.xlsx"

FullPath=Path&FileName

Set objFSO = CreateObject("Scripting.FileSystemObject")

if objFSO.FileExists(FullPath) then

objFSO.Deletefile FullPath

End if

set XLApp = CreateObject("Excel.Application")

XLApp.Visible = False

set XLDoc = XLApp.Workbooks.Add

txt1=ActiveDocument.GetSheetObject("TX02").GetText

txt2=ActiveDocument.GetSheetObject("TX03").GetText

XLDoc.Sheets(1).Cells(1,1).Value=txt1

XLDoc.Sheets(1).Cells(1,3).Value=txt2

'XLDoc.Sheets(1).Paste()

XLDoc.Sheets(1).Range("A1:B1").Merge

XLDoc.Sheets(1).Range("C1:D1").Merge

XLDoc.Sheets(1).Range("A2").Select

ActiveDocument.GetSheetObject("CH03").CopyTableToClipboard true

XLDoc.Sheets(1).paste()

'ActiveDocument.GetSheetObject("CH03").CopyTableToClipboard true

'XLDoc.Sheets(1).paste()

XLDoc.Sheets(1).Name = "Export"

XLDoc.SaveAs Path & FileName

XLDoc.Close

MsgBox("Success!")

XLApp.Quit

end sub

PFA ...

Regards

Kabilan K.