Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Write back to Excel but on 64 Bit Qlikview

Just wondering if there's anyone who has done a 64 bit Qlikview with a macro that accesses Excel in 32 bit version. I have stumbled upon this issue where i have all my developments done in 32 bit and everything is fine up until i deployed to production where the environment is in 64 bit. The macro cannot create Excel.Application objects since excel is in 32 bit while Qlikview is being run on 64 bit (qvs).

5 Replies
Not applicable
Author

We run QV 64bit and exporting to PPT works just fine, eventhough it's 32 bit


Set PPApp = CreateObject("Powerpoint.Application")
PPApp.Visible = True ' Create a presentation
Set PPPres = PPApp.Presentations.Add
...


If you post your code I can try it on our machine.

Cheers, Lukas

Not applicable
Author

similar code. i have

Set xlObject = CreateObject("Excel.Application")

once it hits this it already says cannot create object. If i run the qvw on a 32 bit qlikview it works, if i run on 64 IDE it fails.

prabhu0505
Specialist
Specialist

Can u please help me to do it in 32 bit version?

Advance Thanks

Not applicable
Author

I'm pretty sure there are other samples out there but here's how i used it where i need to dump the content of a straight table into a particular sheet in my workbook.

Sub WriteBackToExcel


ActiveDocument.GetSheetObject( "MyObjectName" ).CopyTableToClipboard true

set v = ActiveDocument.GetVariable("QvWorkPath")
f_name = v.GetContent.String & "\MyExcelFile.xls"

Set oXL=CreateObject("Excel.Application")

set oWB = oXL.Workbooks.Open(f_name)
set oSH = oWB.Worksheets.Item(1)

With oSH
.Range("A1:D5000").ClearContents
.Range("A1").Select()
.Paste()
end With

'excel cleanup
oWB.Save
oWB.Close

set oSH = Nothing
set oWB = nothing
set oXL = nothing

end sub

Not applicable
Author

I have solved this way.

Try this.

1. Find your DAO File Directory and File Name.

   ( Mine is "C:\Program Files (x86)\Common Files\microsoft shared\DAO\DAO360.DLL")

2. Start - Run - regsvr32.exe "Your DAO File's Full Path"

   (ex. regsvr32.exe "C:\Program Files (x86)\Common Files\microsoft shared\DAO\DAO360.DLL")

3. Close and reopen your qvw file.

I hope this helps you.