Solved

Import Excel worksheet into Delphi StringGrid

Posted on 2010-08-30
3
2,245 Views
Last Modified: 2012-05-10
Ok, I've got

Procedure foo;
var
    FExcel : Variant;
begin
    FExcel:=CreateOleObject('Excel.Sheet');
    FExcel.Application.Workbooks.Open('c:\test.xlsx');


What lines do I need to add to:
Select a worksheet in Excel
Copy the raw data from that sheet into a delpgi string grid ?

Code example wanted please

ta.

0
Comment
Question by:WeeStinker
[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
3 Comments
 
LVL 10

Expert Comment

by:GlobaLevel
ID: 33563202
dont know enough about Delphi..

is it for the current worksheet"

Sheets("Sheet1').activate
'number of ways to select...

' for exxcel 2003...excel 2007 has 1,044,xxx rows...
Range("A1:ZZ66000").select

i dont know how you would paste into delphi...you may have to write an ado sql command to query the excel the insert into delphi via a recordset...
0
 
LVL 65

Accepted Solution

by:
rockiroads earned 500 total points
ID: 33563218
I don't know much about Delphi either, looks a bit like Pascal which I did back in the dark ages lol.
How about the code snippet here, would that help? http://www.swissdelphicenter.ch/torry/showcode.php?id=1728
0
 

Author Closing Comment

by:WeeStinker
ID: 33563224
Perfect, that links to just the codee I want.

Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Making delphi communicate with a c# service 16 138
Create a path if not exists 7 125
how to change, disabled button color FMX ? 1 64
Delphi: sending SMS on android platform 1 104
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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