OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-03-2010, 16:24
atri
Guest
 
Posts: n/a
Default Import values from existing excel files to corel

Hello

How can I import values of one cell from Excel file (*.xls) to Corel Visual Basic Script.
When Excel is running I use:

'Set xl = GetObject(, "excel.application")
kom = xl.cells(1, 1).Value

But what can I do when Excel is closed (I don't wanna to open it)

Best Regards
Reply With Quote
  #2  
Old 02-03-2010, 17:15
shelbym's Avatar
shelbym shelbym is online now
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Excel

If Excel is not running I think you want to use the CreatObject:
Code:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Best of luck,

-Shelby
Reply With Quote
  #3  
Old 03-03-2010, 01:46
atri
Guest
 
Posts: n/a
Default

Thank You Shelby for quick reply.

But I mentioned before Excel is not running and I don't want to run it.
I need access to *.xls file without opening Excel

Best Regards
Reply With Quote
  #4  
Old 03-03-2010, 08:03
shelbym's Avatar
shelbym shelbym is online now
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,770
Blog Entries: 10
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Excel

If you want to read the file without opening Excel you will need to use an ADO connection. Alex has an example of this posted here:

Read Data from Excel File

Best of luck,

-Shelby
Reply With Quote
  #5  
Old 09-03-2010, 15:10
atri
Guest
 
Posts: n/a
Wink

Hello

Thanks Shelby for answers.
Anyway I make it in other way (Yours idea was a bit difficult to me

Set objexcel = CreateObject("Excel.Application")
Set objworkbook = objexcel.Workbooks.Open _
("d:\list.xls")

Excel runs as process but without window opening.

Best regards
Reply With Quote
Reply


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
How to import values from a file, replace text,save file for each value with new name amaart CorelDRAW/Corel DESIGNER VBA 1 28-09-2007 12:41
Import / Paste Excel into CorelDraw 12 JIMXAV General 3 11-05-2007 07:11
Reading from an Excel and Putting it into Corel all_ashish CorelDRAW/Corel DESIGNER VBA 6 23-04-2007 04:33
files import graphicdesigner CorelDRAW/Corel DESIGNER VBA 11 19-11-2004 23:56
Is Corel to Excel data exchange possible? alex69 CorelDRAW/Corel DESIGNER VBA 8 24-06-2004 04:52


All times are GMT -5. The time now is 00:01.


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