Solved

Excel File

Posted on 2002-03-09
5
171 Views
Last Modified: 2012-05-05
I have generated report In FlexGrid Control which i would like to transfer it to Excel Worksheet. Is it possible...?

I was told that in doing so it wasnt suitable in online Implementation.

Suggestions Solicited.

0
Comment
Question by:kaliappank
5 Comments
 
LVL 3

Accepted Solution

by:
Bahnass earned 50 total points
ID: 6854250
U can just copy & Paste

I mean

' Where Fil is Ur excel file

    Dim XlApp As excel.Application, XlBook As excel.Workbook
    Dim Fil As excel.Worksheet, Rng As excel.Range
    XlApp.DisplayAlerts = False
    XlApp.Workbooks.Open FileName:=App.Path & "\TRYIT.xls"
    Set XlBook = XlApp.Workbooks(XlApp.Workbooks.Count)
    Set Fil = XlBook.Sheets(1): DoEvents
 ' change the 5 , 4    as U need
Set Rng = Fil.Range(Fil.Cells(5, 1), Fil.Cells(4 + .Rows, .Cols - 0))


    with flx
        .Col = 0: .Row = 0
        .RowSel = .Rows - 1: .ColSel = .Cols - 1
        Clipboard.Clear
        Clipboard.SetText .Clip: DoEvents
        Fil.Paste Destination:=Rng
    end with
0
 
LVL 3

Expert Comment

by:Bahnass
ID: 6854251
Hope this help

But also if U have a recordset there is a new recordset save method for new excel!!!
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6854734
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7618151
Hi kaliappank,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept Bahnass's comment(s) as an answer.

***  Richie_Simonetti's excellent link shows how to go from Excel to grid, but question is how to go from grid to Excel

kaliappank, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7665479
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now