Solved

Excel File

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

770 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