Solved

Excel File

Posted on 2002-03-09
5
183 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

696 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