Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I have a situation in macro,i need to export a text box from my report to excel. I am able to export multibox,tables but not text box.
Plz help me with it???
Hi,
Try the attach application.
Deepak
Hi. Just did an example of this. See attached file. //Robert
Hi,
Cud u plz tell me the syntax cz i am using the personal edition of qlikview.
sub ExportExcel()
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = true
Set xlDoc = xlApp.Workbooks.Add()
Set xlSheet = xlDoc.Worksheets.Add
xlSheet.Name = "SheetFromExcel"
xlSheet.Range("A1").Value = getVariable("vButtonText")
xlSheet.Range("A2").Value = getVariable("vTextBoxText")
Set SheetObj = ActiveDocument.GetSheetObject("myChart")
SheetObj.CopyTableToClipboard true
xlSheet.Paste xlSheet.Range("A10")
End sub
function getVariable(varName)
set v = ActiveDocument.Variables(varName)
getVariable = v.GetContent.String
end function
thnx Robert
Hi Robert
There is one more thing,how can the size of the text in the text box be increased when exporting it to the excel??
Do you mean once the text is in excel?
In that case:
add the line
xlSheet.Columns("A:A").EntireColumn.AutoFit
after the line
xlSheet.Range("A2").Value = getVariable("vTextBoxText")
//Robert
this is a good list of examples that you may find useful:
http://www.activexperts.com/activmonitor/windowsmanagement/scripts/msoffice/excel/
/Robert