Solved

Excel File

Posted on 2002-03-09
5
169 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

744 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

13 Experts available now in Live!

Get 1:1 Help Now