Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting to Excel

Status
Not open for further replies.

CBT

Programmer
Oct 2, 2001
3
CA
I am using Crystal report version 7 in VB 6
I need to export the report to Excel version 8.
I could do this from the crystal viewer with export option,
but I do not want to bring up the viewer just to do this.
So I export directly to a file from the crystl32.ocx control, however the control only expose the printfiletype constant upto excel 5.
How can I export to excel 8 directly ??

Thanks in advance;

btw; the reason I want to export to execl 8 so the file can open on Exel XP cleanly

 
Do you have Excel 8.0 on your computer? If not, try to upgrade your Office. Also can you give me the code to
export Excel directly? Thanks!!!
 
I have Excel 97 which is version 8 right ??
Don't think it matter whether you have excel or not, when
using the crystal report ocx control.

Here's the codes .......
crwReports.ReportFileName = strFile
crwReports.Connect = ReportsDSN

crwReports.ParameterFields(0) ... etc

'Export to a file in Excel 5 mode
crwReports.PrintFileType = crptExcel50
crwReports.Destination = crptToFile
crwReports.PrintFileName = cdlgReports.FileName

where crwReports is the name of the ocx control on the VB form

Export to Excel rely on the dll called u2fxls.dll and the version I have is capable of exporting to later version of excel, it is just the ocx control won't let me specify it.

Initially, I thought ugrading crystal report to the new version of ocx control and would resolve my problem.
But when I registered version 8 crystal ocx control, the option is still NOT available ..
Am I missing something ???

Cheers

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top