Visual Basic Creating an Excel Object under Wine

Questions about Wine on Linux
Locked
Marcelo R
Level 2
Level 2
Posts: 11
Joined: Sat Jan 09, 2010 2:16 am

Visual Basic Creating an Excel Object under Wine

Post by Marcelo R »

Hi all!
I am running wine in Ubuntu 12.10 amd64.
I have a program in Visual Basic 6 (lets call it Report) that reads some databases and then creates by sending all the information to Excel. In windows, when I click the export button it will open Excel and show the report.
Unfortunately I cannot make it work in wine. Even though I managed to install Excel 2003 and Report in the same wine win32 prefix, I get an error '91': Object variable or with block variable not set.
I used winetricks to install the following DDLs:
  • comctl32
    comctl32ocx
    comdlg32ocx
    jet40
    mdac27
    mdac28
    mfc42
    mmmask
    msvcirt
    msxml3
    riched20
    riched30
    richtx32
    vcrun6
    vcrun6sp6
    wsh56vb
    wsh57
The ddls overriden (native, buildin) for Reporter are:
  • comctl32
    jscript
    odbc32
    odbccp32
    oleaut32
    oledb32
    riched20
    scrrun
    vbscript
Excel has no overriden DLLs.

When I run Report, the console output is:

Code: Select all

wine .wine/drive_c/Program\ Files/Report.exe
err:ole:CoGetClassObject class {6c736db1-bd94-11d0-8a23-00aa00b58e10} not registered
err:ole:CoGetClassObject no class object {6c736db1-bd94-11d0-8a23-00aa00b58e10} could be created for context 0x1
fixme:storage:create_storagefile Storage share mode not implemented.
err:ole:CoGetClassObject class {ecabb0c0-7f19-11d2-978e-0000f8757e2a} not registered
err:ole:CoGetClassObject no class object {ecabb0c0-7f19-11d2-978e-0000f8757e2a} could be created for context 0x1
fixme:ntdll:find_reg_tz_info Can't find matching timezone information in the registry for bias 180, std (d/m/y): 0/00/0000, dlt (d/m/y): 0/00/0000
fixme:heap:RtlCompactHeap (0x110000, 0x0) stub
Even though I am not a Visual Basic programmer, I read in the Internet that usually you make this call to create the Excel object to pass it data later:

Code: Select all

CreateObject("Excel.Application")
Maybe that part is the one failing... I am totally lost, and any help will be really appreciated!
Thanks!
Marcelo R
Level 2
Level 2
Posts: 11
Joined: Sat Jan 09, 2010 2:16 am

Re: Visual Basic Creating an Excel Object under Wine

Post by Marcelo R »

Nobody? :?
Marcelo R
Level 2
Level 2
Posts: 11
Joined: Sat Jan 09, 2010 2:16 am

Re: Visual Basic Creating an Excel Object under Wine

Post by Marcelo R »

Should I file a bug about this? The program runs fine under Windows...
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Visual Basic Creating an Excel Object under Wine

Post by dimesio »

You should not file bugs if you have used native dlls. File bugs for the problems that those native dlls were needed to work around.
Marcelo R
Level 2
Level 2
Posts: 11
Joined: Sat Jan 09, 2010 2:16 am

Re: Visual Basic Creating an Excel Object under Wine

Post by Marcelo R »

Well, I think this is an egg and chicken problem, because without those overriden DDLs the program won't even run. The wiki for Office 2003 states the DDLs I need to install in order to run it, so how would I do that?
I can't believe I am the first one who needs a Visual Basic App to launch Excel... :? I am wondering if anyone would know if I need to override another DDL to make that work...
Thanks anyway...
User avatar
dimesio
Moderator
Moderator
Posts: 13367
Joined: Tue Mar 25, 2008 10:30 pm

Re: Visual Basic Creating an Excel Object under Wine

Post by dimesio »

That's the point: if it doesn't run without those native dlls, those are all Wine bugs. The question is, are you sure you actually need each and every one of them? You have installed an awful lot of them. If they're really needed, you should be able to identify a specific problem solved by each and every one of them.

I'm sure lots of people have tried to launch Excel from other apps (they definitely have tried that with Word), and it doesn't work because Wine's OLE implementation is poor. Native oleaut32 (from XP) might help, but tends to be unstable.

The only dlls needed to run Office 2003 are riched20 and gdiplus. Both of those are installed by Office itself, so all you need to do is set the overrides after installing. All of this is explained in the AppDB howto. http://appdb.winehq.org/objectManager.p ... n&iId=3214.
Locked