Msflexgrid..

Anis
10-09-2001, 07:02 AM
hi..
I need to print Msflexgrid.... Crystal reports i cannot use..
I have huge amount of data, that i need to populate onto flexgrid.. in colors... so, what i should do?.. how i can send all the values as it is to excel?..
thanks

anis
"Miles to Go Before I Sleep!!........."

ANUNEZ
10-09-2001, 07:32 AM
Can you create an Excel object and then add all the information to the spreadsheet, save the spreadsheet, and then close it?

I hope this help.

Anis
10-09-2001, 07:43 AM
currently i am picking records from access 2000, anf filling my flexi grid as required...
how to save in excel?.. thats my qs?... how to create excel object?


anis
"Miles to Go Before I Sleep!!........."

ANUNEZ
10-09-2001, 09:06 AM
Here's a small example:
You must set the reference for excel in the reference dialog.

Dim xlapp As New Excel.Application

xlapp.Visible = True
xlapp.Workbooks.Add

'Create a LOOP to send all the data from
'the flexgrid to Excel.

xlapp.Cells(5, "B") = "Test"
xlapp.Cells(6, "B") = 10
xlapp.Cells(7, "B") = 15.25
xlapp.Cells(8, "B") = -125.25
xlapp.Cells(9, "B") = "Test"
xlapp.Cells(10, "B") = "Test"

'CHECK if the FILE exist before saving the new
'file, otherwise you will get an error.
'You can use the DIR() to check for the file
'name before saving.

xlapp.ActiveWorkbook.SaveAs "c:\Myfile"

xlapp.Quit ' When you finish, use the Quit method to close
Set xlapp = Nothing ' the application, then release the reference.

Anis
10-09-2001, 10:28 PM
Thanks i will check it out and get back to you..


anis
"Miles to Go Before I Sleep!!........."

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum