OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Thread Tools Search this Thread Display Modes
Old 02-02-2004, 04:34
Posts: n/a
Default Excel worksheet

hi there again!

how can i import the values of an excel.worksheet?

1: excel is running
2: theres a worksheet with A1 to A5, different values
3: i want every cell´s value in a different textshape in corel

is this possible (i think so)? i don´t wanna create temporary textfiles and so on..

thank ya all for ya help
Reply With Quote
Old 02-02-2004, 08:43
Alex's Avatar
Alex Alex is offline
Join Date: Nov 2002
Posts: 1,941
Blog Entries: 4
Default Re: Excel worksheet

Here is a very simple VBA macro for CorelDRAW which connects to a running MS Excel instance with a worksheet open and text data in cells A1-A5. It then creates 5 artistic text objects in the current CorelDRAW document containing the values of the 5 Excel cells:

Sub TestExcel()
    Dim xl As Object
    Dim n As Long
    Dim sCellValue As String
    Dim y As Double
    Set xl = GetObject(, "Excel.Application")
    For n = 1 To 5
        sCellValue = xl.Cells(n, 1).Value
        y = 11 - n
        ActiveLayer.CreateArtisticText 0, y, sCellValue
    Next n
End Sub
Please refer to MS Excel object model documentation on the details of using its objects (such as Application.Cells, etc).

I hope this helps.
Reply With Quote
Old 02-02-2004, 09:28
Posts: n/a
Default Excel

Hi alex!

thank you very much! that was what i´ve been lookin for!

this wonderful forum here helps me in all of my (VBA-)problems *s*

Best regards from germany,

Silv R.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading from an Excel and Putting it into Corel all_ashish CorelDRAW/Corel DESIGNER VBA 6 23-04-2007 04:33
Is Corel to Excel data exchange possible? alex69 CorelDRAW/Corel DESIGNER VBA 8 24-06-2004 04:52
Read Data from Excel File LxRAE CorelDRAW/Corel DESIGNER VBA 5 14-04-2004 02:10
Preview from CorelDRAW file and/or worksheet reanan CorelDRAW/Corel DESIGNER VBA 5 15-05-2003 18:29

All times are GMT -5. The time now is 21:56.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com